MIME-Version: 1.0 Content-Type: multipart/related; boundary="----=_NextPart_01D7CCBE.43296D80" This document is a Single File Web Page, also known as a Web Archive file. If you are seeing this message, your browser or editor doesn't support Web Archive files. Please download a browser that supports Web Archive. ------=_NextPart_01D7CCBE.43296D80 Content-Location: file:///C:/F5ADCD53/LFS170x-LinuxFoundation-Blockchain-XXXpgs.htm Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset="windows-1252"
LFS170x - Linux <=
span
class=3DSpellE>FoundationX
=
Blockchain:
Understanding Its Use Cases and Implications
Welcome to LFS170x: Blockchain - Understanding Its Use= Cases and Implications
Linux FoundationX - L= FS170x (2021 version)
Once you complete this course, you will have a good understanding of what blockchain is and its impact and potential for change around the world. You will also be familiar with some of the immediate blockchain use cases in technology, business, and enterprise products and institutions.
LFS170x is part of the Blockcha= in for Business Professional Certificate. Skills in blockchain are being reported as the top job-skill in demand. This program is designed for the business professional who needs to understand the potential (or threat) of blockchain to their company and industry. Armed with better information of = the blockchain landscape, this program will help you rise to new challenges in = your current role by giving you a new dimension on which you can add value to yo= ur employer.
a)
Introduction
b)
Introduction to Blockchain =
and
The Early Internet
d)
Career Opportunities in
Blockchain
f)
Summary
a. Introduction
c. Cryptography
d. Transparency and Immutabili=
ty
e. Summary
a. Introduction
b. Smart Contracts<=
span
style=3D'font-size:12.5pt;font-family:"Inter",sans-serif'>
d. Public and Permissioned
Blockchains
e. The Blockchain Transaction<=
/span>
f. Consensus
g. Summary
a)
Introduction
c)
Governance
d)
Identity and Anonymity on
Blockchain
e)
Summary
a)&n=
bsp;
Introduction
b)&n=
bsp;
Problems Blockchain Solves<=
/span>
c)&n=
bsp;
Digital Currencies=
a>
d)&n=
bsp;
Future Trends
e)&n=
bsp;
Summary
a) Introduction
f) Platform Developer’s Soluti=
ons
i) Summary
By the end of
this chapter, you should be able to:
·&nb=
sp;
Discuss
blockchain technologies and the early Internet.
·&nb=
sp;
Explain the
difference between blockchain and the cryptocurrency Bitcoin.=
·&nb=
sp;
Discuss
blockchain characteristic=
s.
·&nb=
sp;
Explain
blockchain components.
- Explain what
the block in blockchain is.
- Explain how
blocks are chained together.
- Discuss the
concept of immutability in a blockchain.=
·&nb=
sp;
Discuss about=
the
roles and users in a blockchain community.
·&nb=
sp;
Discuss use cases for
general blockchain solutions.
Blockchain is=
a
peer-to-peer ledger system that allows peers to transact directly with
each other eliminating the need for a central authority.
At its core,
blockchain is a system for recording information about a transaction in a n=
ew
decentralized way that makes it difficult or impossible to alter. These
transactions are stored on sheets or
blocks in a digital ledger that is shared among the participants of the
network. Consensus on the transactions, brings the peer-to-peer network into
agreement. Once the agreed-upon transactions blocks are recorded in the
immutable ledger, trust becomes a
fundamental component built into the system.
What started as a DARPA (Defense Advanced Research Project Age=
ncy)
experiment in decentralized computing communications between two university
labs in California in 1970, became the Transmission Control Protocol/Intern=
et
Protocol, INTERNET PROTOCOL SUITE (TCP/IP) developed as a standard in
networking protocol or computer communication standards, and it is the back=
bone
of today’s Internet.
With the TCP/IP protocols in place, users had the abil= ity to link hypertext documents in an information system accessible from any node = or computer using the TCP/IP protocol. The resulting information system or database is today’s World Wide Web.
With the birth of the World Wide Web, expanded usages = of this new technology arose along with expanded business opportunities. Web servers, people who host and store the documents and web browsers, companies set up to help you view linked documents, help create a household need for = this technology and the Internet explosion began.
The Internet =
can
be grouped into three distinct segments characterized by the way people
interact with this new technology.
·&nb=
sp;
Web 1.0 -
Internet of Connection
·&nb=
sp;
Web 2.0 -
Internet of Information
·&nb=
sp;
Web 3.0 -
Internet of Value
Let’s discuss
them in more detail.=
Characteristics of Web 1.0:
· Development of a host of web-based applicati= ons, which fostered in online services, such as email.
· Content from administrator.
· Managed by a central authority.
· Read-only, information was “pushed” to users= .
· Email was the first widely adopted applicati= on on the Internet.
Email, Electronically Transferring Information
Computers and items for connection became necessities. Technology advancements in computers brought on changes, floppy disks became hard drives that stored MB that turned into GB that turned into TB. Internet speeds switched from kilobits to tens of megabits per second, to gigabits p= er second and RAM grew from hundreds of kilobytes to gigabytes and the dot-com bubble began. Companies appeared attempting to cash in on this new technolo= gy, most notable was a company called Netscape which developed the first commercial Web browser.
Characteristi=
cs
of Web 2.0:
User-generated
content.
Read-write,
individuals can interact with
information.
Information
became siloed.
Data became a
commodity.
Web 2.0 saw
emerging marketplaces that brought together unrelated buyers and sellers in=
a
seamless low-cost way. Data became a commodity collected, siloed and sold; =
we
were giving up our
information at a frenzied pace. Websites let users generate content, social
networks became part of our lives.
=
Social Networ=
king
Use Case: Music Sharing Companies<=
/strong>
Approach: Music stored on many computers connected
peer-to-peer. Napste=
r software
supplied its users with a centralized index of all music files and directed
users to where these files were located on the connected peers' computers.<=
/p>
Result: The industry cracks down music sharing compani= es copyright infringement. Napster is forced to ta= ke down its index, shutting down the platform.
Approach: Music stored on many computers connected peer-to-peer. BitTor= rent's software was purely decentralized, the files were stored as packet on the peers' computers and when a request was made for a song, the software would find the packet and send it to the user.
Result: The industry cracks down music sharing compani= es copyright infringement. BitTorrent is asked to shut down their platform. Since they do not control the software once downloaded= to a peer, if two computers are running the software sharing can still occur.<= /p>
Music sharing companies gave us the first glimpse into peer-to-peer networking. Besides copyright infringement, the main challenge= for the music sharing companies was file integrity. You could never be sure the file you requested was the file you would get and there was no one to compl= ain to. Both Napster and BitTorrent are operating today, with different business models.
Characteristi=
cs
of Web 3.0:
·&nb=
sp;
Community
interaction.
·&nb=
sp;
More connecte=
d,
open, and intelligent.
·&nb=
sp;
Distributed
ledgers or blockchain technology, smart contracts, machine learning and
artificial intelligence.
·&nb=
sp;
Identity and
information will be held by the individual, breaking data silos.
Bitcoin is the
first widely accepted application for the Internet of Value (just as email =
was
the first big application for the Internet of Information).
Cryptocurrenc=
ies,
Electronically Transferring Value
The Internet =
of
Value represents a world where value is
exchanged at the speed in which information moves today. The Internet is st=
ill
the basic platform that these new technologies operate from. The new Web 3.0
browsers are being built to help you manage your cryptocurrency, keys,
passwords and other blockchain
features. Let’s now dive into blockchain basics.
There's a new technology that has the power to revolut= ionize how you, businesses, and the world interact!
You've probably heard of it: it's called Blockchain!= p>
But what is it? How does it work? How does it affect y= ou?
Hearing the word "blockchain" is comparable = to hearing the word "internet" in the early 90s.
It seemed elusive, like something that wasn't going to impact your daily life.
But here we are, more than 20 years later. Think about= how the Internet has transformed businesses, commerce, communication, even music and video.
And that's not even touching on how the Internet has affected you.
We all carry the Internet in our pocket.
We can transfer money at the touch of a button, check = the weather, get directions, and even have food delivered to our door.
The next technology to have that kind of impact isn't = some of the buzzwords you hear.
It's not big data. It's not artificial intelligence. I= t's not even social media.
It's BLOCKCHAIN!
Now, let's discuss the vast promise blockchain has for= every business, every society, and for everyone listening today.
And let's begin with an example we are all familiar wi= th.
When you attach a file, a Word document, an Excel shee= t, a PDF to an email, you aren't sending an original.
You are actually sending the recipient a copy, and tha= t's a great way to move information around.
But it's not so great when it comes to things like mon= ey, stocks and bonds, music, loyalty points, intellectual property, tickets to a game or concert.
Then, sending a copy is suddenly a very bad idea.
Let's look at an example.
If I send you tickets to a concert, it's important tha= t I don't send you a copy.
You now own the original asset and I can no longer use= or sell those tickets.
Similarly, if I send you $100, it's important that I s= till don't own the $100, or have the ability to send it to anyone else.
Both of these examples illustrate a double spend probl= em, and those can be eliminated with blockchain.
So now, in this exciting time in history, every kind of asset, from tickets, to money, to music, can be stored, moved, exchanged, a= nd transacted without an intermediary.
People everywhere can transact peer-to-peer and trust = each other by using collaboration and cryptography.
How did we get here, to this place of trust and collaboration?
It began when Satoshi Nakamoto, whose true identity is= still unknown, released a white paper in 2008, introducing a purely peer-to-peer version of electronic cash known as Bitcoin.
It is here that blockchain technology made its debut.<= /p>
Even today people believe Bitcoin and blockchain are o= ne and the same.
They are not!
Bitcoin, another alternative curre= ncy, utilize blockchain technology.= p>
While an important one, Bitcoin is only one use case for blockchain.
Blockchain allows people to exchange assets and perform transactions without a third party.
Imagine a world where you don't need intermediaries.= p>
While traditionally we have needed central authorities= to trust one another and fulfill contracts, blockchain makes it possible to ha= ve our peers guarantee that for us. But how?
Assets, like we've discussed, are no longer stored in a central place, but distributed across a global ledger, using the highest le= vel of cryptography.
When a transaction is conducted, it's posted across te= ns of thousands of computers around the globe.
These transactions are recorded as blocks.
Let's imagine a sheet of paper that has 25 lines.
When a sheet is filled up with 25 transactions, the bl= ock is validated via group consensus.
Once the page has been validated, it is added to a sta= ck of previously validated sheets.
Each sheet on the stack can be assumed to be trustwort= hy because, once a sheet is validated, it can't be changed.
Because at this point, all the sheets are linked toget= her.
And to link our sheets together, we embed information = from the previous sheet of paper into the new, recently validated sheet.
In blockchain, our sheet of paper is equal to a block.=
The act of embedding a previous block of information i= nto the current block of information is called chaining, hence, the name blockchain.
In order to compromise or hack a blockchain network, s= omeone would have to gain control of the majority of computers in that network.
This is extremely difficult to do.
There is no longer a single point of failure, and this= is what makes blockchain infinitely more secure than what we have today.
Blockchain isn't just for assets, though. It extends to contracts.
These are called Smart Contracts.
And what are they exactly? What they sound like.
A smart contract self-executes and handles enforcement= , the management, and performance of agreements between people.
Examples of smart contracts include insurance policies, copyrighted content, escrow and lending, wills, and trusts.
Smart contracts will revolutionize how we do business.=
There are so many possibilities with blockchain; not j= ust in the now, but with things we haven't begun to think about yet.
Bitcoin is a digital currency running on top of the Bi=
tcoin
blockchain. We will develop the concept of cryptocurrencies in later sectio=
ns.
Bitcoin has no borders and was created as a decentralized payment system, an
alternative to currencies issued by governments. Let us look at what it mea=
ns
to be a currency.
Purpose of currency:
· Medium for exchange
· Store of value over time
· Accepted as a measure of worth
According to Invest= opedia, “Fi= at currency is money a government issues that is not backed by a commodity like gold. Fiat money is backed by the government and it has value because the government says so and the citizens believe it. The dollar is an example of= the United States fiat currency”.
Apart from the government issuing Fiat, a centralized
authority needs to keep track of assets. Banks, credit card companies’
stockbrokers are companies that represent a centralized authority that cont=
rols
your money.
Bitcoin is transacted over the Bitcoin network, which = is an open, public blockchain network. If you have an Internet connection and a Bitcoin wallet application, you can receive and send the cryptocurrency Bitcoin. Cryptocurrencies like Bitcoin have value because it can be proven = with math. Unlike banks offering centralized services, you are responsible for y= our cryptocurrency.
Bitcoi= n and cryptocurrencies are great use cases for blockchain, but they are just one component of the technology. Some privately run blockchains do not use cryptocurrencies as a function of their blockchains. Blockchain technology = can easily transfer anything from property rights, stocks, and even artwork. Th= ere are many more use cases that utilize blockchain technology far reaching than currency transfer.
In this section, we're gonna talk about what blockchain is: a real simple introduction to the basic concepts = and principles behind blockchain.
When you hear about blockchain, you probably think of = new, high-emerging tech.
Well, really, all blockchain is, is a combination of technologies that have existed for a long time.
They're simply combined in a new and creative way to g= ive us an amazing new platform on which we can start to build solutions.
Blockchains are often referred to as digital decentral= ized ledgers.
And when you think of that, all you can think of is something we're all familiar with: a simple notebook.
When we talk about blocks and blockchain, all we're re= ally talking about is a page of data.
We fill up this page with any kind of data imaginable,= and, while most of the time today, we're talking about recording financial transactions on this page, or this ledger, or this block, we can record any kind of data we want.
In fact, you can think of a block as being exactly lik= e this piece of paper, in that the paper doesn't know or care what kind of informa= tion you're recording on it.
And just like the paper doesn't know or care, neither = does the block in a blockchain.
So, while most of what we're recording today are finan= cial transactions, we could also record things like voting records and results, = land titling, medical records, or even the opening notes to a Beethoven symphony= .
What makes this blockchain notebook incredibly powerfu= l is that all the pages are linked together.
So that if I go back and try and change any data on an= y page anywhere in this notebook, I break a link in a very obvious and easy-to-determine way.
This gives blockchain a key property known as immutabi= lity.
And it's what gives blockchain the security that we've= come to know and depend on.
Blockchains also give us an incredible technology call= ed smart contracts, which allow us to programmatically define the rules and st= eps that should be performed any time a certain type of event is recorded in our blockchain or in our magic notebook.
So, when you think about blockchain, don't get intimid= ated thinking it's something high tech, and new, and cutting-edge.
It's simply a new and creative way of combining old id= eas together to give us an incredible new solutions platform.
And the rest of this series will take a deeper dive in= to these basic concepts and principles, but if the idea of this unchangeable linked notebook makes sense, congratulations!
You already understand all the major principles and co= ncepts required to understand what blockchain is and why it's so powerful.
A block on a blockcha= in can be thought of much like a page in a notebook. Data is stored on a block, ju= st like data is written on a page of a notebook. Similar to a sheet of paper, = the digital ledger doesn't care what kind of information you're putting on it. = So, while most of what we're recording today are financial transactions, we cou= ld also record things like voting records and results, land titling and medical records, etc. What makes this blockchain notebook incredibly powerful is th= at all the pages are linked together. So that if you go back and try and change any data on any page anywhere in this notebook, you break a link in a very obvious and easy-to-determine way.
Any data can =
be
stored on the same block. Examples of stored data include:
·&nb=
sp;
Medical recor=
ds
·&nb=
sp;
Property
agreements
·&nb=
sp;
Voting=
Each block is chained= or tied to the previous block by embedding the block with information from the prev= ious block (we will go through this in depth later in the course).
If the data is tamper= ed with anywhere in the chain, the links will break in a very obvious way:= p>
This provides immutab= ility and security.
Blockchain is a combi=
nation
of several other underlying technologies that have never been combined so
successfully. Here are some features that make this new technology so
revolutionary.
A ledger is a collect= ion of transactions. It is not a collection of assets. Assets are part of a transaction, but the ledger records the transaction. With a digitally distributed ledger or a blockchain, no one owns the ledger. The ledger is distributed among participants in the network, all running the same blockch= ain protocols. It is decentralized in that an identical copy of the ledger exis= ts on every node/computer on the network. In 2009 with the publishing of Satos= hi Nakamoto’s whitepaper “Bitcoin: A Peer-to-Peer Electronic Cash System” , = Bitco= in became the first application to leverage blockchain technology by recording the first asset transfer on a public blockchain ledger.
The ledger is
stored, updated, and maintained by a peer network. Nodes form the
infrastructure of a blockchain network. T=
hey
store, spread and preserve the blockchain data, so a blockchain exists on
nodes. All nodes on a network follow the same rules of operation or protoco=
ls,
but nodes have different roles. A full node contains a copy of the blockcha=
in
protocol, transaction
history of the blockchain and aids in the maintenance of the blockchain. Us=
er
node interacts with the ledger. With blockchain technology, a lack of a
centralized authority is replaced with a peer-to-peer network.
=
Blockchain networks c= an be public or private. A p= ublic blockchain is open to anyone with an internet connection and the appropriate application. A private blockchain grants access and rights to its users bef= ore they can interact.
In a blockchain, we c= an see all the transactions that have occurred on the shared or distributed ledger= . A blockchain stores details of every transaction that occurred since the first transfer. This first transfer, along with some system information that we w= ill discuss later, becomes the first block in our chain and is referred to as t= he genesis block. Since every node shares a copy of the agreed-upon ledger, th= ere is no friction about the transactions, everyone has the same agreed-upon co= py. Centralized systems are not transparent, the information about the ledger is controlled by one authority.
Blockchain ledgers are
different from centralized ledgers because network participants have an
agreement upon what is in the identical ledger. In order for the blocks to =
be
added, all the nodes in the system come to agree as to what transactions are
accurate and should be added to the chain of blocks. Since there is no cent=
ral
authority telling the nodes which transactions are valid, a new way to reach
agreement or come to consensus
The way in which each blockchain comes to consensus is built into the protocol, they are the rules built into the code that determine how the nodes will add ledger transactio= ns. The Bitcoin network uses a proof of work consensus model. This process of building agreement among a group of mutually distrusting participants is a benefit of blockchain consensus.
Encryption and crypto= graphy are combined with blockchain technology to assure the information on the blockchain is authentic. In our previous real-world example, the music shar= ing companies not only had legal issues from copyright infringement, they also could not solve the data integrity problem. Music downloaded from these platforms was only as reliable as the anonymous person storing and sending = it. The data had no integrity. Cryptography and blockchain offer a secure way to prove something is authentic. Instead of relying on third-party, trust is p= ut into cryptographic algorithms that prove the provenance and authenticity of= an attestation.
Some blockchains offe= r an additional feature, smart contracts= em>, that impose logic into the system. If you thin= k of the Bitcoin blockchain as a calculator recording financial transactions, you can think of these blockchains as computers. The first of these blockchains is Ethereum, cre= ated by Vitalik Buterin,= Joe Lubin and team. Ethereum runs the EVM, Ethereum Virtu= al Machine, which has the ability to impose digital agreements or smart contra= cts. A smart contract is a program that runs on a blockchain that can impose contractual agreements. Typically, they work as digital agreements that enf= orce a specific set of rules. These rules are predefined by computer code, which= is replicated and executed by all network nodes. Blockchain smart contracts al= low for the creation of trustless protocols. This means that two parties can ma= ke commitments via blockchain, without having to know or trust each other. They can be sure that if the conditions aren't fulfilled, the contract won't be executed. Other than that, the use of smart contracts can remove the need f= or intermediaries, reducing operational costs significantly.
With new
technology comes new opportunities and this holds true for blockchain. As t=
his
nascent technology matures, more positions are needed to fill this increased
demand. A few of these new
positions are listed here:
Entry Level and Internship Posi=
tions
Mentorship
programs and internships include assisting in the designing and developing
blockchain distributed ledgers based on both public and private or permissi=
oned
blockchains. With open-source, development and success depend on an active
community, Working Groups and Hackatons are available
for the newcomer. Skills include basic blockchain
knowledge and some familiarity with basic programming languages.
Blockchain Architect
For a blockch=
ain
solution to be functional, it first needs to exis=
t.
The blockchain architect is the person or group who designs and implements =
the
backend code of the blockchain. The blockchain architect works with blockch=
ain
engineers and technical leaders to identify the blockchain structure for
specific use cases.
Architects understand consensus mechanisms, cryptography systems, key
management techniques and smart contract management. Qualifications include=
Go,
Java, Javascript, or any mode=
rn
programming language plus project management skills.
Blockchain Developer
Developers design, write
and upload smart contracts to the blockchain. Developer design workflows th=
at
operate with blockchains and smart contracts.
Responsibilities can include project design, smart contract development and
implementation, front end applications design and application deployment.
Skills a developer needs can include Microsoft SQL Server, Visual Studio, .=
NET,
MVC, AJAX, SQL, C, Python,
Solidity, C++, C#, Javascript, Node.js, JQuery=
, SOAP, REST,
FTP, HTML, XML, XSLT, XCOD, Neural-networks, Regression, Agile Scrum, MYSQL.
Solutions are developed for Hyperledger Fabric, Ethereum, Quorum Ripple, Co=
rda
and other distributed ledger solutions.
Blockchain Operator
Once the
blockchain solution is designed and built, operators can join to create the
peer network mentioned previously. The role of
operators (nodes) is to store copies of the ledger and keep their copy up to
date by distributing transactions and new blocks throughout their network v=
ia
peer-to-peer communications.
Blockchain Regulator
Many business=
es
operate under regulations regarding how their data should be stored and
processed. This is the same for blockchain solutions. Regulators rarely
interact with the blockchain directly, rather
oversee regulatory requirements that need to be considered in blockchain
development. With governments researching Central Bank Digital Currencies,
governing these blockchains will become increasingly more complex.=
span>
Blockchain Project Managers=
Project manag=
ers
are the first persons in an organization who are contacted when a company w=
ants
to bring blockchain in house and adapt it to their technology
platforms. Responsibilities include deciding if a blockchain solution is a =
good
fit for a business situation. If the decision is to move forward, Project
Managers would organize key players and resources needed to execute the
blockchain project.
Data Storage and Processing
Managers
The blockchain
provides distributed, immutable storage with built-in integrity checking, b=
ut
certain limitations exist that hav=
e to
be managed. Data decisions need to be made dealing with maximum capacity ba=
sed
on the standard block size and block rate. Policies need to address how to
provide integrity verification for large amounts of data, should data be st=
ored
off-chain with a =
hash
of the data stored on-chain. eMembers of the peer
network must execute the code to remain in sync with the current state of t=
he
network. If smart contracts commonly require large amounts of processing po=
wer
to complete, devices external to the peer
network may be used to augment the processing power of the network.<=
/span>
Blockchain Data Scientists<=
br>
Blockchain has
the ability to collect large amounts of dat=
a.
The Blockchain Data Scientist collects, interprets, analyzes and manages da=
ta.
Developing algorithms that can analyze patterns in large data sets, the data
scientist provides insight into the data collected.
Blockchain Quality Engineer=
This position=
is
responsible for ensuring quality in all areas of blockchain development, su=
ch
as automation frameworks and tests, manual
testing and dashboards to support mobile, web and platform engineering. A
quality engineer will need to research and advise on blockchain tools and
develop quality assurance (QA) automated test standards, as well as define,
write and implement test
automation strategies for load performance tests. Applicants may also need =
an
engineering management MBA degree.
Blockchain Legal Consultant=
or
Attorney
A blockchain
legal consultant is responsible for advising companies on how to structure
blockchain endeavors. Advise on how to structure and govern initial coin
offerings, some of which are now coming under greater regulatory scrutiny.
Attorneys will also be
tasked with developing legal partnerships and contracts as blockchain
technology offers "smart contracts", which are self-executing bas=
ed
on previously agreed terms. Duties can include designing legal partnerships
that would connect the crypto ecosystem wi=
th
existing financial structures, and supporting various merger-and-acquisition
activities, such as negotiating and drafting legal agreements and performing
due diligence on blockchain projects.
Blockchain Web Designer
A decentraliz=
ed
community needs to keep the community that supports it informed. When inclu=
ding
the use of cryptocurrencies in your business and when launching blockchains=
, there will be a
greater need for websites to inform customers what a company is offering. A
blockchain web designer will need to come up with original concepts, creati=
ve
graphics and "mind blowing" user interfaces and dashboards to eng=
age
a diverse and inclusive communit=
y.
Blockchain Consultants
Blockchain
consulting companies and blockchain consultants are tasked with advising
companies on designing and implementing
blockchain solutions. This includes the documentation and maintenance of
solutions, as well as their initial implementations.
NFT Graphics Designer
NFT stands fo=
r a non fungible<=
/span> token, a spe=
cial
token that represents a unique ID that is linked to a piece of crypto art t=
hat
cannot be replicated and is used to verify ownership of a piece. The
collectable world is jumping in head first and creating non fungi=
ble
tokens that represent art, music, memorializing events, newspaper articles =
and
record releases. Designers are needed to turn these moments/media into art =
for
the thirsty NFT market.
There are a lot of really interesting use cases being explored with blockchain right now.
When you first get into blockchain, one of the areas y= ou'll see people immediately jump to are healthcare, how can we manage our person= al health information on the blockchain, and voting an election reform, and bo= th of these are really, really interesting ideas.
The goal behind the folks looking at blockchain for healthcare is the idea that it would be great if your medical records could= be accessible with your permission to anyone else, anywhere on the planet.
So, if you're halfway across the world on vacation and= you fall ill and end up in a hospital, wouldn't it be great if the doctor treat= ing you had full insight into your medical records, knew any allergies you had,= or knew any prescriptions that you were already on?
So, that's a very, very big area, and this ties a lot = into blockchain and Identity Management.
How do we safely identify and protect people's persona= l data on blockchain?
So, a lot of interesting challenges there that are bei= ng worked out...
Blockchain for voting and election reform is a big top= ic right now, especially with all the conversation lately about how do we ensu= re the integrity of elections and demonstrate that our results haven't been tampered with or altered.
This is an area where blockchain could add a lot of va= lue.
And then, of course, we hear a lot about traditional u= se cases, areas that are getting a lot of traction in blockchain right now.
Probably one of the biggest are supply chain, value ch= ain relationships, which are very, very common in today's economy.
We have very, very few products or services that are o= ffered completely and solely by one organization, without the involvement of other vendors, partners, suppliers, manufacturers, third-party organizations, etc= .
So, blockchain to track the supply, the origin of the = goods and services that we consume is a big use case.
Walmart is really pioneering this right now with a blockchain solution that they're using to identify the provenance of meat, where does the meat that is sold in a Walmart store come from, and the ulti= mate goal here is that, when we do have contaminated foods, and we have to issue= a recall, currently, because we just don't have good insight into that supply chain, we recall and destroy a lot more food than we really need to, which = is tremendously wasteful, especially with all the people on the planet that we could be giving that good food to.
So, these are some real, real exciting areas that we s= ee being pursued in blockchain right now.
On the public sector, there's a lot of interest in blo= ckchain for law enforcement purposes.
How do we allow different law enforcement agencies at = the federal, state, county, city level, all to share data seamlessly, in a safe, secure fashion, which also protects people's personal privacy and anonymity, when appropriate.
Another area where blockchain is getting explored and = is generating a lot of excitement is with artists, with people who produce content.
So, if you're an author, if you're a musician, if you'= re an artist, traditionally, you've only been able to get your work out to the public, in the hands of the public, by going through a third-party intermediary.
So, if I'm an author, traditionally, the only way I've= been able to share my creation with the general public has been going to a publishing company and getting my works published.
Blockchain enables lots of interesting scenarios where= I can sell that work directly to consumers, create new subscription models, and t= his is having very interesting effects on the work itself.
One of the things we're seeing is that traditional book publishing, there's anywhere between 12 to 18 months delay between when the author finishes the last word of a book and when it actually ends up into t= he consumers hands.
Well, if we can use blockchain to enable consumers to purchase this material or subscribe directly to the content creator, we take that lag time completely out of it.
And this allows authors and content creators to do some really interesting things.
You could write a fictional story and have one of your= characters respond real-time to a news story that actually happened last week.
It makes for very compelling reading and it's just som= ething we're not able to do today in the traditional publishing world because of t= hat delay.
We also see a lot of interest in blockchain for fracti= onal asset ownership scenarios.
So, we know we're 10-15 years away from having self-dr= iving cars be a very regular thing, and when we all get our own self-driving car,= if we're smart, we're gonna have that car take us = to work and then turn around and perform ride-sharing services throughout the = day, when we're not using it, in order to recoup some of that investment.
Well, in a blockchain world with coins and tokens, we = can fractionalize that asset ownership, and I can take that same money I used to buy one self-driving car which operates in one city, and I could buy one percent of a hundred self-driving cars in the hundred's biggest cities on t= he planet.
And so, if they're ever weather conditions, where mayb= e my car couldn't operate locally, that's okay.
I have a much more diversified investment, which conti= nues to offer returns, because I have a virtual guarantee that any major city th= at I have one percent of my car ownership in is currently in rush-hour right now= , in peak times of people needing a ride.
So, there are lots of very very= span> interesting use cases for blockchain in the real world right now.
I would encourage all of you to dig in a little bit mo= re, and see some of the interesting things that are going on with blockchain in healthcare, in public sector, in insurance, in supply chain, value chain and more, see what other folks are doing, and then go out and make your own blockchain dreams a reality.
A Business to
Consumer (B2C) is business or transactions conducted directly between a com=
pany
and consumers who are the end-users of its products or services. Services b=
eing
provided to the consumer is =
an
area of interest to companies. Benefits to the consumer are transparency to=
the
consumer, accountability from suppliers, ethical sourcing validation, labor
verification and an immutable shared view.
=
Vertical mark=
ets
see the advantage to the transparency feature in blockchain. Financials,
logistics, charity funding, agriculture and ethical sourcing tracking are a=
ll
markets leveraging blockchain to offer new insights to the custome=
r.
Approach: The blockchain collaboration, known as TrustC= hainTM, will track and authenticate diamonds, precious metals and jewelry at all st= ages of the global supply chain, from the mine to the retailer/consumer.
Result: The jewelry industry can now track and authenticate diamonds and precious metals through every stage of the supply chain. Blockchain provides physical product verification, process verificat= ion and servers as an ethical oversight.
With a
decentralized approach, blockchain removes the
middleman (such as banks and brokers) to facilitate faster and less expensi=
ve
payments. The shared ledger approach also eliminates the need for multiple
paper copies that need to be verified and updated frequently.=
Industries li=
ke
finance, international trade and commerce, food supply chains=
are
taking a serious look at blockchain.
·&nb=
sp;
Approach: DLT Labs along with Walmart Canada initiated a tracki=
ng
program tackling the enormous problem in the freight and shipping industry =
of
dispute resolution in disparate invoicing systems. The solution connects all
points on the supply chain with a shared trusted ledger. This eliminates the
root problems that cause invoice disputes. The carriers are a vital link in
Walmart's supply chain backbone, and the DLT solution ensures invoicing sys=
tems
run smoothly.
· Result: Demonstrable transformation of freight management and carrier relationships by implement= ing a shared DLT invoicing system with trust and transparency build-in, reduces disputes among organization by 95%.
One of the coolest things about blockchain is some of = the unintended consequences a good blockchain solution might have.
Let's look at an example.
Right now, there is a lot of attention being given to = how blockchain might be used, in general, for supply chain relationships and, specifically, in the food supply chain.
Let's pretend that you have a very young child and your child has a serious pesticide allergy.
So, of course, when you go to the grocery store, you m= ake sure that you only buy the produce in the produce section that has the USDA organic label.
It's just a little sticker that goes on the produce.= p>
So, you buy your produce and you stand in the checkout= line, and you feel pretty good that the produce you're buying actually is organic= and has been treated with all-natural pesticides, and won't make your young chi= ld sick.
But sometimes you wonder, standing in line, how do I r= eally know? How do I really know that someone didn't just print up a bunch of the= se stickers in their basement and apply them at the last minute?
The blockchain can go a long way to solving that probl= em and providing much greater insight.
Let's say, you're standing in the grocery store one da= y, and instead of the easily forged stickers, you're able to pull out your phone a= nd scan a QR code.
When you scan that QR code, instantly on your phone the entire lifecycle of that piece of produce pops up.
You can see the date that it was planted on the orchar= d.
You can see after it was planted that an organic pesti= cide company came along and treated it with an all-natural pesticide.
You can even verify that the pesticide is natural by s= eeing the ingredient list in that pesticide.
And finally, you may see who actually delivered that p= roduce to the store.
Let's say that there's a new green electric trucking c= ompany out there - Ed's Electric Trucking.
Ed has seen all the fancy new Tesla semis. He thinks t= hey're great and he is committed to providing a transportation and logistics compa= ny which is also environmentally friendly.
Now, in today's world, you don't have a way of knowing= about someone like Ed and his electric trucking company.
There just aren't good ways for folks in the B2B space= to communicate their business value directly to consumers.
This is an interesting potential byproduct of using blockchain and smart contracts as a business solution.
Not only would I, as a consumer, have greater insight = into the origin of that produce and feel much better standing in the checkout li= ne, but maybe what Ed's doing resonates with me personally.
Maybe I'm a very green-conscious consumer.
I didn't know there was such an organization as Ed's.<= /p>
And I have to buy a few more things while I'm at the s= tore, besides produce. I have to buy some deodorant, some shaving cream, and some laundry detergent.
So, when I buy that deodorant, shaving cream, laundry detergent, I only buy the ones that were delivered by Ed's Electric Truckin= g.
This gives Ed and other B2B players a new and exciting= way to establish brand and gain mindshare with the consumer that they currently don't have.
Certainly, it was not the original problem we went to = solve with blockchain, but many times, when we apply blockchain to a real-world problem, we find out there are a lot of unexpected benefits just like this.=
So, look for blockchain not just to transform the area= s that we're aware it might make a difference in, but also to provide some new exciting and unintended benefits.
The public sector is = the part of the economy composed of both public sector and private sector enterprises that are operating on behalf of the public. It is the business of taking ca= re of the people. Public sector includes all government, military, police, pub= lic health and welfare, infrastructure, etc. Public sector organizations levera= ge blockchain technology to move away from siloed and inefficient centralized systems. Current systems are inherently insecure and costly, with duplicated and in-efficient workflows. Blockchain networks offer more secure, agile, a= nd cost-effective structures.
So, when people first start getting into blockchain, o= ne of the areas they really start to look at is where is blockchain being used in= the real world, what examples do we have of a blockchain being deployed and at = what scale.
And there's really no better example of this right now= than what's going on in Dubai.
Dubai, the largest city in the United Arab Emirates, is piloting a very ambitious program called smart Dubai 2021.
And what Smart Dubai 2021 aims to do is to move all governmental operations and record-keeping on the blockchain by the year 20= 21.
The goals of this program are increased transparency i= n the government operations, increased efficiency, and by proxy, providing better service to city residents and constituents and establishing Dubai as a thou= ght leader, an industry leader in the blockchain space.
There are lots of really cool applications that tie in= to this.
Blockchain is becoming the enabling layer for a lot of= other Smart Dubai initiatives around creating a smart city.
So, projects like automated traffic signals, registrat= ion of citizens for governmental services, etc. are all being pioneered on blockch= ain.
So, if you want to see some of the really exciting use= cases in blockchain right now, be sure to check out Dubai and what's going on with their Smart Dubai 2021 initiative.
·&nb=
sp;
Approach: To make Dubai the happiest city on Ear=
th
by recreating everyday experiences for residents and visitors of Dubai, mak=
ing
them more personalized seamless, efficient and impactful. The Smart Dubai strategy will be using three essential
pillars: government efficiency, industry creation and international leaders=
hip
· Result: By the end of 2021, Dubai government will go completely paper-free, eliminating more than one billion pieces of paper used for government transactions every day. When successful, Dubai wi= ll be the first blockchain-powered government driving the future economy.
Blockchain is
having far reaching effects in major industries. Let’s take a look at three
major industries having a positive influence from this new way to organize =
our
information:
·&nb=
sp;
Supply chain<=
br>
Blockchain is
used in supply chains to gain transparency and traceability. This has a spe=
cial
advantage for global health when used in traceability to the food supply ch=
ain.
By tracking food on a blockchain, you are building t=
rust
into the system through the transparency feature. In the event of a problem,
blockchain technology can pinpoint the exact location and cause of a food
health issue. By instantly tracing food issues back to the source, all
contaminated lots can be trac=
ked
and dealt with instantly.
·&nb=
sp;
Global trade<=
br>
Blockchain is
making headway in the global trade markets with transparency and immutabili=
ty
that offer new relationships among distrusting parties. Blockchain makes su=
re
all relevant parties have access to the same
information. Trade barriers are reduced, from settlement issues, to complia=
nce
and regulation, information is being shared and accessed in new secure ways=
. A
distributed ledger technology (DLT) opens up a new avenue for securely shar=
ing
data that guarant=
ees
accuracy while removing banks as deal facilitators. Smart contract and
microfinancing alternatives allow all size companies to seamlessly trade ac=
ross
borders.
·&nb=
sp;
Digital ident=
ity
(self-sovereign identity and verifiable credentials)
Users of the Internet =
were
all but unaware that all the information given so freely when interacting w=
ith
companies online, was being stored and sold. Data became a siloed commodity
owned by everyone but you. With new blockchain technology, individuals can
reclaim their identity
information breaking the need for data silos, endless passwords and hackable
databases. Self-sovereign identity (an individual identity holder controls
their credentials and can use them without permission) gives secure identity
verification designed to
bring trust and personal control so people can prove things about themselves
using trustworthy verifiable digital credential.
In this chapt=
er,
we discussed:
·&nb=
sp;
The history of
the Internet and how blockchain technology relies on Internet technology as=
the
foundation for
building the future of the blockchain evolution.
·&nb=
sp;
The difference
between blockchain and Bitcoin.
·&nb=
sp;
How blockchain
functions.
·&nb=
sp;
Blockchain
concepts and characteristics: distributed ledger, peer to peer, transparent,
consensus, encryption, immutability,
programmable.
·&nb=
sp;
Blockchain us=
ers
and their roles.
·&nb=
sp;
Emerging gene=
ral
use cases.
In this chapt=
er,
we will discuss distributed ledger
technology, some of its basic components and how it differs from previous
ledger storage techniques. We will gain an understanding of how previous
computer technologies like file sharing, data storage=
and
cryptography are wrapped into the blockchain foundatio=
ns.
We will also see how hashing functions and Merkle tree data structures help=
us
immutably store and prove facts without revealing all the details.=
span>
Next, we
will learn how these blockchain techniques are fundamental in public-k=
ey
cryptography where key p=
airs
support privacy and authenticity by only exposing the public key while keep=
ing
the private key secure. We will examine how this agreed-upon, append-only
distributed ledger guarantees transparency and immutability, where trust in=
the
information contai=
ned
in the ledger is a given.
By the end of
this chapter, you should be able to:
·&nb=
sp;
Discuss how
cryptography allows for distributed ledgers to work on a global scale.
·&nb=
sp;
Explain how
blockchain is using cryptography.
·&nb=
sp;
Define key te=
rms
of cryptography and understand basic concepts.
·&nb=
sp;
Explain the
concept of zero-knowledge proofs (ZKPs) and Merkle trees and how they are u=
sed
in blockchain technologies.
·&nb=
sp;
Discuss how
blockchain utilizes transparency.
·&nb=
sp;
Explain what =
it
means for blockchains to be immutable and how chaining provides this capabilit=
y.
In this section, we're going to discuss the core compo= nents of the blockchain, starting with a high-level view of the blockchain components.
The first blockchain component that we're going to loo= k at it's the ledger.
However, before we discuss the ledger, let's discuss b= riefly the history of the ledger.
The story of blockchain is tightly coupled with the st= ory of accounting.
Historically, humans started off with no way to prove ownership and we began with a single entry accou= nting system.
The single entry accounting= system for the first time in human history allowed us to prove ownership of the as= set.
The ledger was associated with an owner.
The single entry accounting= worked for centuries.
The issue with single entry accounting is that it mand= ated that there was a single authority, which is the reason why there was the necessi= ty for a king or a queen to control the ledger.
In order to have trade, right, at the international le= vel, we needed to have at least two authorities.
For instance, for England to do trade with France, we = had the owner of the ledger, the single entry ledger= , in England for instance, doing trade with the king or queen of France, who also had their ledger.
And so, we needed a new form of accounting, and that's= where double entry accounting came in, which was in use up until very recently, n= ow, within the last 40 years.
What blockchain is? Blockchain is the very first implementation of triple entry accounting, where we have an asset being recorded on the ledger in the context of a transaction.
The third entry and triple entry accounting is cryptog= raphy, where we have a cryptographic account of the transaction stored permanently= and immutably on the ledger.
That's what the ledger is. A ledger is a collection of transactions.
It is not a collection of assets. Assets are part of a transaction, but the ledger records the transaction.
In blockchain, the differentiator is that no one owns = the ledger, or all of the participants own the ledger.
The ledger is distributed. It is, in other words, it's decentralized. So, there's a copy of the ledger that exists on every node t= hat exists on the network.
Said simply, the ledger is a distributed immutable rec= ord of a collection of transactions.
Bitcoin is the most popular asset.
It was the first asset to be recorded as a transaction= on a blockchain ledger, and it remains the most popular, at least in terms of ma= rket share.
That's what the ledger is.
As we move to more modern blockchains, we start to loo= k at blockchains such as Ethereum, which not only records the asset on the blockchain,
Ethereum and other public blockchains like Ethereum, t= hey also allow you to have a permanent and immutable collection of code, also k= nown as a smart contract, that runs on the blockchain.
The ledger stores the assets, the transactions that ar= e on the blockchain, and it also holds the code.
The code that's stored on the blockchain is a smart contract.
Again, a smart contract is a program that runs on the blockchain.
The blockchain is a network.
The blockchain is a ... A public blockchain is equival= ent to the Internet, complete with its own set of protocols, etc.
Private blockchains are more synonymous with an intran= et.
It is... just like we have a use case for public block= chains and public internet, we also have use cases for private blockchains and an intranet, if we're gonna stay with that analogy= .
On each of these networks there are nodes. The nodes a= re going to be synonymous with the computers that make up the network.
On the nodes, they are put together by a collection of protocols.
Each blockchain has its own set of protocols that defi= nes not only the nodes, but how those nodes communicate with each other.
So, when you hear the term "peer network", t= hat's what we're talking about; we're talking about how that blockchain is put together, what are the protocols that define the peers, and how those peers interact.
Those peer networks, they store the ledger, they provi= de the updates, they effectively, they maintain the ledger.
That's what a peer is on a peer network.
On a public blockchain, it's public, and, by definitio= n, that means that anyone is allowed to join and participate in that public blockchain.
On the private blockchain, however, the situation is a little different.
On the private blockchain, we have to control who can = access your network.
Just like no company would allow... no company would a= llow anyone to access their private intranet, in a private blockchain you have t= o be asked to join, or you have to have permission to join.
A membership service is a gateway that allows users and components to enter a private blockchain.
A membership service or a membership service provider provides the services of user authentication, user authorization, component authentication, component authorization, more specifically Identity Managem= ent.
If we're talking about a private blockchain, then we h= ave to control who the members are, and not only the members.
We have to also control the nodes that access the blockchain.
As we're talking about membership, one of the key comp= onents of membership is we have to allow certain users to access the blockchain.= p>
In order to do that, we have to have a definitive iden= tity for each user.
In the blockchain, that's achieved in two ways.
One, we use PKI, to provide a public key. And that pub= lic key represents the identity of the user.
But we also need a private key that each user can hold= to prove their identity.
That private key is stored in a wallet. And a wallet i= s a collection of the user credentials. It is effectively ... it encapsulates private keys.
Additionally, in the blockchain... blockchains are self-contained, or they should be self-contained.
And so, one of the key aspects for developing on a blockchain or using a blockchain is we have to have a way to interact with = the blockchain.
And one of the ways that we do that is through events.=
So, when something occurs on the blockchain, either pu= blic blockchains... most public blockchains anyway, and certainly all private blockchains, they have events that are fired when certain key actions are triggered.
This allows end-users, other systems, other users, dif= ferent components to be able to act off of the events that come from an update on a blockchain.
Some terms th=
at
are mentioned in the video we will get familiar with in later chapters, but=
are
worth a brief description for clarification:
·&nb=
sp;
Ethereum
Ethereum, like Bitcoi=
n,
is a decentralized open-source blockchain. Unlike the Bitcoin Network, the
Ethereum Protocol has the
ability to run smart contracts. The cryptocurrency running on the Ethereum
network is called Ether.
·&nb=
sp;
Smart Contrac=
ts
A smart contr=
act
is computer code that can be run on a blockchain that executes the conditio=
ns
of an agreement.
·&nb=
sp;
Public
Blockchains
Public blockc=
hain
has no barrier to entry. Anyone with a cell phone and a digital wallet can
transact on the blockchain.
·&nb=
sp;
Private
Blockchains
Private
blockchains or permissioned blockchains have a Membership Services piece th=
at
grants access to users before they can interact with the blockchain.
·&nb=
sp;
Digital Walle=
t
A digital wal=
let is a computer
application that represents a traditional wallet. It gives the user the abi=
lity
to store and transact cryptocurrencies through the Internet.<=
/span>
·&nb=
sp;
Public Key
Infrastructure (PKI)
Public Key
Infrastructure is the identity management system for instilling trust into =
the
electronic transfers of informat=
ion
or value. It is the technology used to authenticate users and information by
issuing a set of key pairs (public and private).
To understand=
how
blockchain came about, we must first understand the following key principle=
s:
·&nb=
sp;
Ledgers
·&nb=
sp;
Basic account=
ing principles=
in
history
·&nb=
sp;
Ledgers first
appeared around 3,000 B.C.
·&nb=
sp;
Single-entry
only.
·&nb=
sp;
Chanakya, an
Indian leader, creates the first documented accounting standards.
·&nb=
sp;
Double-entry
ledger appears in 1340 A.D.
·&nb=
sp;
Tracks debits=
and
credits.
·&nb=
sp;
Tells the sto=
ry
of a transaction from both/all sides.
·&nb=
sp;
The Italian L=
uca Pacioli, recognized as=
the
father of accounting and bookkeeping, was the first person to publish a wor=
k on
double-entry bookkeeping and introduced the field in Italy.=
span>
·&nb=
sp;
Triple-entry
accounting is an enhancement to the traditional double-entry system, in whi=
ch
all accounting entries involving outside parties are cryptographically seal=
ed
by a third entry.
·&nb=
sp;
Debits, credi=
ts,
and an immutable link to all past debits and credits.
·&nb=
sp;
Triple-entry
ledger appears in 2008 in a white paper by Satoshi Nakamoto (a.k.a.,
Blockchain).
·&nb=
sp;
Some features
include: tamper-proof records, distributed ledgers, double-entry+=
cryptography, validated,
secure, and private, digitally signed receipts.
As described in the Reddit post,
"A seller books a debit to accou=
nt
for cash received, while a buyer books a credit for cash spent in the same
transaction, but in separate sets of accounting records. This is where the
blockchain comes in: rather than these entries occurring separately in
independent sets of books, they occur in the form of a transfer between wal=
let
addresses in the same distributed, public ledger, which creates an interloc=
king
system of enduring accounting records. Since the entries are distributed and
cryptographically sealed, falsifying them in a credible way or destroying t=
hem
to conceal activity is practically impossible".
Idea for the followin= g was obtained from the LinkedIn article "Explaining Blockchain: The Distributed Ledger of the Island of Yap" by Anthony (Tony) Riva.
The concept of distributed ledge's has been around for hundreds of years.
To understand the basics of blockchain, it's important= to understand how distributed ledgers work.
A distributed ledger is a collection of data with no c= entral administrator that has been agreed upon by consensus.
To understand more details, let's take a trip way back= , back into 500 AD on the island of Yap.
The Yapese people used a very unique form of currency:= the Rai stone.
Each of these stones weighed around 200 kilos, making = them difficult to move.
To exchange them as money for goods or services, they divided the stones into sections and then, they would announce to every adu= lt on the island who owned what part of each stone.
Each adult had to keep a mental ledger of ownership.= p>
Every time any Yapese conducted a trade, an announceme= nt was made to the entire tribe.
Each member of the tribe would then update their mental ledger.
In today's description, this would be called a distrib= uted ledger.
All Rai stone ownership was known to everyone, and that knowledge was updated whenever a transaction was made.
So why didn't just one member of the tribe keep track = of the Rai stones?
What if that main recordkeeper was sick, unable to do = their job, or was found to be dishonest?
If the only copy of the ledger was changed by any mean= s, wealth would be lost or gained unfairly.
The Yapese knew their distributed ledger system safegu= arded it from tampering.
Since all the Yapese knew who owned what, it would be = very difficult to fool everyone on the island.
Even if one tribe member moved away, the tribe still h= ad multiple copies of their mental ledger.
In this regard, the ledger was fault tolerant and coul= d not be easily changed, corrupted, or lost.
The tribe also decided that stones didn't have to be o= n the island to hold value.
One day, a stone fell into the ocean and the Yapese de= cided that this stone, even though it could not be seen, still held value and cou= ld still be traded.
This system of consensus by the majority of the adults= on the island with no central administrator is one of the first examples of distributed ledger.
The group shared the = ledger.
The group agr=
eed
to the ledger.
=
=
All changes or
transactions to the ledger were announced to the group.
=
=
The group agr=
eed
to update all ledgers.
Let's review =
an
example on Yap Island:
Alice agrees =
to
trade Bob her stone by the pond in exchange for all of his cattle.=
span>
Alice and Bob
announce their transaction to the tribe.
Everyone upda=
tes
their mental ledger.
From this poi=
nt
on, they agree that the stone by the pond is owned by Bob.
Alice tries to
corrupt Carol, so that Carol’s ledger shows that Alice never gave up owners=
hip
of the stone.
·&nb=
sp;
Centralized
ledger, only one place to cheat.
·&nb=
sp;
Decentralized
ledger, Carol will be outvoted by the rest of the tribe, and her version of=
the
ledger will not be accepted.
If Alice want=
s to
cheat, she will need a way to convince 51% or more of the tribe to accept an
alternative ledger.
We've gone through history and seen how ledgers have e= volved from stone tablets to double entry ledgers.
We even took a look at the earliest known example of distributed ledgers.
Now, let's discuss the evolution of the ledger in the = modern world.
Over the last few decades, ledgers have moved from the written form to the digital form, also known as computers and digitalized databases.
This has allowed us to be interconnected - a truly glo= bal economy.
Today, this recordkeeping system is being revolutioniz= ed again,
going from the digital realm or centralized databases keeping track of transactions to information being stored across different locations across the globe.
This system of record, information across a global net= work, is what we call decentralized ledgers.
A decentralized ledger can be described as a ledger of= any transactions or contracts supported by a decentralized network from across different locations and people, eliminating the need of a central authority= .
When a recording is made, every participant is notifie= d of that recording.
They now own an identical copy of the record of transactions, identical to every other node on that network.
Every piece of information on a blockchain can be trac= ed back to the exact moment when it was created.
So, if an audit is necessary, information can be found= and deemed reliable.
This allows blockchain to serve as a truly reliable st= orage of public records and transactions, and therefore eliminating the need for a centralized authority of database of records.
Now that we understand the foundational principle of blockchains - distributed ledgers, it's important to understand another important key element that makes blockchain so revolutionary: trust.
Trust is created through two key principles: collabora= tion and cryptography, both of which will be discussed shortly.
As we can see by look= ing at the evolution of the ledger, we are entering a new phase where no one centralized authority has control of the details in the ledger, everyone do= es. Transactions are only added to the ledger if everyone agrees. Once consensu= s is reached, no one can go back and deny a transaction. So essentially you are = not trusting one person or entity to control the ledger, you're trusting everyo= ne. Let's look a little further into how that trust is achieved.
A great way to think of blockchain is to think of blockchain as another layer= of the Internet, a layer that enables secure and trusted records and transacti= ons to occur, which is why a lot of people associate the word blockchain with t= he word trust.
Blockchain creates a layer of trust between untrusted parties.
Without blockchain to create trusted records and transactions, a third party intermediary is necessary.
Blockchain eliminates the need for a centralized institution to act as intermediary, a= nd instead uses cryptography and collaboration to create that trust.
In an earlier chapter of this course we spoke about collaboration through distributed ledgers.
Now, we will be taking a further look at how cryptography is used in blockchain = to create the second element necessary for blockchain to be a source of trust.=
Information on the blockchain is stored on the ledger using cryptography.
It can be accessed using keys and cryptographic signatures.
Now, let's take a look into some of the key concepts of cryptography that are utilized with blockchain.
So, one of the reoccurring themes in blockchain is that while blockchain itself may be new and cutting-edge, it's built out of noth= ing more than very old tried-and-true technology.
And one of the areas this is most true is in cryptogra= phy.
When a lot of people first get introduced to cryptography they think it's a very new cutting-edge science.
And while there are new developments being made everyday, cryptography itself is a very, very old sci= ence.
One great example of this is the story of Rose Greenho= w.
Rose Greenhow lived in the Washington DC area during t= he Civil War, and she was actually an undercover spy for the Confederate Army.=
Rose Greenhow was a wealthy socialite, and she threw m= any fancy, elaborate parties, and was also invited to many= , many high-end social events.
Many of these events were attended by members of the U= nion Army, generals and strategists, who Rose pretended that she didn't know much about military strategy and wasn't too interested in the war in general.
In secret, at all these events she was soaking up all = the information she could.
Rose actually developed her own method of encrypting d= ata.
She came up with her own encryption scheme and she use= d this scheme to mail letters down to the Confederate Army, revealing the plans of= the Union Army, troop positions, general high-level strategy, etc.
Rose did this for a number of years, until finally her encryption method was broken and she was actually one of the very first peo= ple who were arrested and prosecuted by the Pinkertons, who later went on to fo= rm the Secret Service.
So, when you hear about blockchain and all the new cutting-edge things that it's doing, don't forget that it has its roots in = very old technology, and we're just combining old technology in new and creative ways to create a brand new solutions development platform.
As described in the "Ancient Uses of Cryptography: Four Examples that Pre-D=
ate
the Internet" article by Melanie Shapiro,
&qu= ot;A little over 2,000 years ago, Julius Caesar developed a simple system to send secure information to his troops. It was all about substituting certain let= ters for others, typically by shifting the letters by a predetermined number. Th= at algorithm is what we would call a cipher, and since Caesar’s invention, cip= her keys are much more secure and advanced. If you want to encrypt and decrypt information, you are going to have to choose a kind of cipher to do so"= ;.
Let's explain=
the
key terms used in cryptography:
·&nb=
sp;
Cryptography<=
br>
Cryptography<=
/span> is a techniq=
ue
used to secure the communication between two parties from a third. The term
cryptography is deri=
ved
from two ancient greek<=
/span> terms, “kryptos” which means
“hidden” and “graphein” which means=
“to
write”.
·&nb=
sp;
Secret
The data whic=
h we
are trying to protect.
·&nb=
sp;
Key
A piece of da=
ta
used for encrypting and decrypting the secret.
·&nb=
sp;
Function
The process o=
r function used=
to
encrypt the secret.
·&nb=
sp;
Cipher
The encrypted
secret data, the digital secret, the output of the mathematical function or=
a
cryptographic algorithm.
·&nb=
sp;
Encryption
This is the
process from plain text (ordinary text) to cipher text (random sequence
·&nb=
sp;
Decryption
Encryption is=
the
reverse process of converting ciphertext into plain text.
=
=
The Secret and
the Key are passed into the Function to create the Cipher.
So, one of the technologies that plays a pivotal role in blockchain and making blockchain secure and immutable is cryptography.
If you've never he= ard of cryptography before, cryptography is simply designed defined as the scie= nce of sending messages back and forth from one party to another, in the presen= ce of adversaries or bad actors, participants who may wish to corrupt or change the contents of a message.
And there's some k= ey concepts you should understand about cryptography before we really dive in = and talk about how cryptography protects the data on the blockchain.
Most cryptographic functions are what we refer to as two-way functions, meaning that we can ta= ke a secret and we can encrypt it, and then we can use that same process to decr= ypt the secret at the other end.
Some of the key objects or concepts to be aware of in cryptography:
first of all are t= he secret, what data are we trying to protect, what is the message we're sendi= ng back and forth that we want to do so in a safe, secure fashion, and try and guarantee that it hasn't been tampered with.
We take our secret= and we combine it with a key, a piece of data that is consumed by a function, o= ur third component.
When the function receives the key and the secret, the function uses the key to change the da= ta in the secret, to create the fourth and final component, which is known as = the cipher.
And the cipher is simply the encrypted message, the thing that, if it were intercepted, if it were seen by anybody else, any non-participants or bad actors, they wouldn't know what the secret was, they wouldn't know what the message was, and they wouldn't know how to decrypt that cipher back into the secret.
Now again, most cryptographic functions are two-way, meaning it doesn't do me a lot of good= to encrypt data if the receiving party at the other end can't decrypt it.
And oftentimes, all this involves is using the same key or a reverse key into the same function, with the cipher's input to get the secret back out.
So, when we talk a= bout cryptography, keep in mind those four basic components: the secret, the key, the function, and the cipher.
Then, understand t= hat cryptographic hashing is a very special class of cryptographic functions, which, unlike all their cousins, are only one way, meaning that in a cryptographic hash I can put information or a secret into it, the key and t= he function are contained as one entity, and what I get back out is encoded da= ta.
I get what's calle= d a hash or a hash result, that is an encryption based on the data that I put i= n.
That is mathematic= ally impossible to reverse-engineer and this is what makes it a one-way function= .
If you put any data into a cryptographic hash and you share that hash with me, there's absolute= ly nothing I can do above and beyond random guessing to try and recreate that input to tell me what your original secret was.
Cryptographic hash= es are used in scenarios where we want to prove a piece of data without sharing that data.
So, password management systems use this all the time.
We don't want to s= tore a username and password…we want to store a username and the hash output of a password.
That way, I don't = know what any of my users' passwords are, but I do know that if they put the wro= ng password in, they're going to get the wrong hash back out, and I can easily validate that a user's password is correct or incorrect, without having to = know what it is.
We're going to div= e in a lot deeper in a later module, to show you exactly through a demo how cryptographic hashing works, and how it provides security and immutability = on the blockchain.
But just understand these two big takeaways:
Number one, that cryptography is normally a two-way function with four components: the secre= t, the key, the function, and the cipher, and then finally, there are a subcla= ss of cryptographic functions called cryptographic hash functions, which exist= as one-way functions, which can only encrypt the secret, and again, which are mathematically impossible to decrypt the secret in any other method other t= han randomly guessing input until you're able to recreate that hash output.
These are key components which enable security and immutability on the blockchain.
Simple example function:
· Secret =3D "Blockchain technology is transformative"
· Function =3D Swap each letter in the secret = with a new letter according to the Key
· Key =3D "+2"
· Cipher =3D "Dnqeme= jckp vgejpqnqia ku vtcpuhqtocvkxg".
As mentioned in the "Ancient Uses of Cryptography: Four Examples that Pre-D= ate the Internet" article by Melanie Shapiro,
&qu= ot;(...), in the 1970s cryptologists Whitfield Diffie and Martin Hellman&nb= sp;made a landmark invention: asymmetric key encryption. It’s the concept that both HTTPS (the popular protocol used to access a secure web server discussed previously) and the secure element within a token rely on to keep your information completely private.
The principles behind it are genius. Instead of a shared key that codes and dec= odes information, the key for encrypting the information is different from the k= ey that decrypts it — that way there is no longer a shared, secret key. With t= his invention, in order to share a secret message, you no longer even have to k= now the person you are sending it to. Most importantly, for people like us who = care deeply about safe authentication and identity protection, the private key itself is never communicated at all, and that means no more shared secrets".
As you start to get more and more into blockchain, one= term that you're gonna hear a lot is Byzantine Fault Tolerance.
And if you're wondering what that means, that very str= ange, cryptic sounding term, that can be explained with a story.
In 1982, a mathematical problem was formulated called = the Byzantine Generals Problem, and without getting too detailed into the mathematics behind it, essentially, with the Byzantine Generals Problem was= a story about two empires fighting a battle.
One Empire exists within the confines of a walled city= , the second Empire has several generals surrounding that walled city, each with their armies waiting to attack.
And the balance of power is very, very evenly matched between these two empires.
And it is such that if all the generals agree to attac= k at the same time, they will have enough power to overcome the empire in the ci= ty and win the campaign.
If they, for whatever reason, they're not able to coor= dinate their attacks simultaneously, and even one general misses the message, well then, the Empire surrounding the walled city is going to lose the campaign = and the war.
So, the Byzantine Generals Problem explored a really k= ey area of cryptography, in fact, the heart of what cryptography is, which is = how do I exchange messages with someone in an environment where they may become corrupt.
You have to understand the only way these generals had= to communicate was to send a disguised messenger through the city with a messa= ge to deliver to the other generals,
and so, this always posed the risk, if you're a genera= l and you're getting amessage from one of these messe= ngers, how do you know or how can you believe with greater than random certainty t= hat the message you're getting is reliable and it hasn't been tampered with.
And this, again, was a problem that was postulated bac= k in 1982 and went unsolved until 2008, when the anonymous Satoshi Nakamoto prop= osed a solution to this problem.
Essentially, what the solution entails is all of the generals hiring as many mathematicians as they can.
When we talk about Byzantine Fault Tolerance, we're ta= lking about the generals having more access, having more mathematicians, or more computing power on their side than the empire within the city.
So, if I'm the generals and I can hire more mathematic= ians, then that means that I can encrypt my messages going through the city with greater and greater complexity, and if the balance of power becomes greatly tipped in the favor of the generals outside the city,
they can use encryption methods which are so complex, = that there really is no real chance, or a very small chance that any of the mathematicians inside the city will be able to intercept that message, decr= ypt it, change the contents, re-encrypt it, and do so in a time quick enough th= at the generals don't notice anything has happened.
And so, this is Byzantine Fault Tolerance.
This is the fault tolerance mechanism that we see used= in most public blockchain solutions right now, including Bitcoin, including Ethereum, although Ethereum is working on transitioning to a system called Proof of Stake, which we'll talk about in a later section.
But, when you hear Byzantine Fault Tolerance, often abbreviated as BFT, all we're talking about is this idea that blockchains become secure if they have more computing power, more hash power in the cha= in than off the chain.
Solutions like Ethereum, 16,000 plus nodes, or Bitcoin= , the largest blockchain network that there is, with over 30,000 nodes, offer us = a high degree of security and immutability, because the computing power on those networks is so great that there's really no reasonable chance that an adver= sary could ever control as much or more computing power to attack the data on th= at blockchain.
And if someone ever were to, chances are the economics behind it would be such that they would spend more to simultaneously harness all that computing power, than they could possibly stand to gain.
And so, this is Byzantine Fault Tolerance.
It is the root of cryptography, which is simply the st= udy of how do we send information back and forth securely in the presence of adversaries and bad actors, and it's what underlies all the security and immutability that we get in blockchain.
To understand
cryptography in blockchain, you must be able to differentiate between vario=
us
cryptographic techniques used. There are four main ways blockchain
leverages cryptography:
·&nb=
sp;
Public Key
Cryptography
This encrypti=
on
method uses a pair of keys: an encryption key, and a decryption key, named
public key and private key, respectively. The key pair generated by this
algorithm consists of a private key a=
nd a
unique public key that is generated using the same algorithm.=
·&nb=
sp;
Zero-Knowledge
Proofs
A new approac=
h to
protecting digital secrets that prove knowledge of a secret without reveali=
ng
it.
·&nb=
sp;
Hash Function=
s
This type of
encryption doesn’t make use of keys. It
uses a cipher to generate a hash value of a fixed length. The function conv=
erts
plain text (no matter the size) into a hash of fixed size. It is nearly
impossible for the contents of plain text to be recovered from the cipher t=
ext.
Think of it like trying=
to
recreate a human from a fingerprint, a fingerprint uniquely represents a hu=
man
no matter the size of the human and you can’t reverse engineer a fingerprin=
t to
recreate the human.
·&nb=
sp;
Merkle Trees<=
br>
A data storage
technique that compresses or packs data for
storing blockchains with a tamper-free component built in. Merkle trees are
built upon hashing principles in that each hash becomes a part of the next =
hash
to build a tamper resistant data storage model.=
Identity in t=
he
blockchain is based on public key cryptography. A person’s
address on the blockchain is their public key.
Transactions =
on
the blockchain include their public key and are digitally signed with the
sender’s private key:
·&nb=
sp;
A digital
signature verifies that someone in possession of the private key authorized the
transaction.
·&nb=
sp;
Digital
signatures can be easily verified using the corresponding public key, which=
is
included in the transaction.
Ethereum is a public blockchain that anyone can partic=
ipate
in. Hyperl=
edger is
an example of an enterprise blockchain where participants must be granted
access to engage in the blockchain.
·
Ethereum
A user’s identity is an address based on their public key.
·
Hyperledger
Identity is managed by X.509 certificates. Certificates are only shared with
parties involved in the transaction.
Public key cryptography uses a pair of a public key an= d a private key to perform different tasks. Public keys are widely distributed, while private keys are kept secret.
Using a person's public key, it is possible to encrypt= a message so that only the person with the private key can decrypt and read i= t. Using a private key, a digital signature can be created so that anyone with= the corresponding public key can verify that the message was created by the own= er of the private key and was not modified since.
Digital Signatures and Key Pairs
Step 1:
Step 2:
Step 3:
So, I want to talk a little bit about cryptography and= some cryptography principles.
The first is easy and hard problems, and this is reall= y what public - private key cryptography is based off of.
There are some problems that are very easy one way, but difficult another way.
And a great example of this is multiplication.
So, if I give you a pen and paper and a lot of time, I= can ask you to multiply any two numbers,
and you can probably come up with an answer fairly eas= ily.
What's a lot more difficult is if I give you the produ= ct of two numbers and ask you to factor that and find out all the numbers you can multiply together to get that result, that's a much harder problem.
This is how public - private key cryptography works.= p>
We use an easy mathematical problem to generate a mess= age, but we make it very, very hard for that message to be decrypted by someone = who shouldn't decrypt it,
and public and private keys play a big role in blockch= ain.
I want to show you right now.
I've got two different wallets. I've got a wallet that you're probably used to, that you keep money in,
and then I've got a hardware wallet, a digital wallet = that you'd use to trade something like bitcoin or ether.
Now, what you're used to, in your regular wallet, is p= utting money in here and you keep your money in here, and if you lose this, whoever finds it gets your money and they get to spend it.
In blockchain, with cryptocurrencies, it's a little bit different.
The only thing that ever gets kept in here is your pri= vate key.
And a private key - public key work together so that I= can use a private key to sign, digitally sign, any message.
You can then take the public key, which anyone can kno= w, and use that to verify that my specific private key was the one that actually signed that message.
And so, you can know without a doubt that I'm the one = who created that message,
that no one was pretending to be me sending this messa= ge.
And this is how it works trading digital currencies ba= ck and forth.
If I decide I'm going to pay you three bitcoins and I'= m gonna do it out of this hardware wallet or any softwa= re wallet, any kind of digital currency,
the only thing that's kept on this device is my privat= e key and it never leaves,
and so, that means if I want to send you some money, a= ll I'm doing is accessing the private key on this device to sign a message that ge= ts transmitted to the blockchain,
that says I'm paying you some bitcoin or some ether or= some litecoin,
and my public key is used to verify that that message actually did come from the wallet that says it did.
And this is how we trade cryptocurrencies back and for= th,
and that's what makes the concept of a digital wallet a little bit different.
If I happen to lose this, I haven't lost the money tha= t's in it, because there's no money ever in it.
All that money is is just = a record on the blockchain, and, as long as I can recover that private key somehow, I can just get a new device,
start using my private key again and keep right on tra= ding.
So, that's how public and private keys fit into blockc= hain; a very key component just to understand that they're used to sign and verify any transactions that you make.
Zero-knowledge
proofs authenticate parties without the need to widely transmit private
information online. A zero-knowledge proof (ZKP) is a
cryptographic method that allows a party (the prover) to prove to another p=
arty
(the verifier) that a given statement is true, without conveying any additi=
onal
information.
Let's review =
an
example. Let's say there are two toy cars, identical in shape and siz=
e,
except, one is red and one is blue. Jerry, who is color-blind, holds the toy
cars behind his back. Jerry then shows one of the cars to Sam. Jerry then h=
ides
that car behind his back and shows Sam the other car. Sam can consistently
detect the switch bec=
ause
the cars are different colors, but he never has to reveal the color of the =
cars
to Jerry in order to prove the secret.
In this section, we're going to talk about a cybersecu= rity idea in blockchain known as "Zero-Knowledge Proofs".
Zero-Knowledge Proofs are exactly what the name implie= s - they allow me to prove to another party that I have a certain piece of knowledge without revealing what that knowledge is.
Zero-Knowledge Proofs are often referred to as zk-SNARKs, which stand for "Zero-Knowledge Succi= nct Non-Interactive Arguments of Knowledge", or zk-SNARKs for short,
or, if you want to be simple, we can just call them Zero-Knowledge Proofs.
A great example of a Zero-Knowledge Proof is what we c= all the cave door analogy.
Pretend that there's a circular cave, with only one en= trance or exit and at the back of this circular cave there's a door which can be unlocked using a secret code entered onto a keypad.
If I want to prove to you that I know the unlock code without revealing that unlock code to you,
all I need to show is that I can walk into one end of = the cave, open the door, and come out the other end.
If I've successfully demonstrated that, then you know without a doubt I've been able to unlock that door,
but yet I haven't revealed that unlock code to you.
This simple cave door analogy is a Zero-Knowledge proo= f, and if you can remember this cave door analogy,
then you'll understand why Zero-Knowledge Proofs are so important in blockchain.
For example, a user may make a request to send another= user some money.
The blockchain naturally wants to make sure, before it commits this transaction,
that the user sending the money has enough to send.
However, the blockchain doesn't really need to know or= care who is spending the money, or how much total money they have.
Being able to answer a question of "Does a user h= ave enough money to send to another user" without knowing who the user is,= or exactly how much they have,
is one of the primary use cases for Zero-Knowledge Pro= ofs in blockchain.
So, when you hear about zk= -SNARKs, don't get intimidated.
It's not a complex idea. Just think of Zero-Knowledge = Proofs and the cave door,
think about how important it is in blockchain to be ab= le to prove a claim without actually revealing the information behind that claim,=
and you'll understand Zero-Knowledge Proofs.
When using
blockchain, the need to trust a central authority to verify the
accuracy of data is removed and replaced by trust in a cryptographic hashing
function. With data integrity guaranteed by algorithms, trust becomes part =
of
the system.
Blockchain
provides users with data integrity in a trustless environment. This is
accomplished using cryptography in a way that moves the burden of trust from
data processors to cryptographic algorithms.
Hash functions
are featured heavily in blockchain. A hash function is a mathematical equat=
ion
with four important properties:
1.&n=
bsp;
Hash functions =
can
take anything as input and create an output with a fixed size. This makes it
possible to condense anything into a piece of data of a fixed size and is h=
ow
messages are condensed for digital signatures.
2.&n=
bsp;
It’s easy to
calculate a hash, but hard to determi=
ne a
hash input from the output. The best option is to keep trying inputs until =
one
produces the desired output.
3.&n=
bsp;
Inputs that
differ by a single bit produce hashes that differ by half of their bits on
average. This prevents someone from finding a desired ha=
sh
input using a “hill climbing”.
4.&n=
bsp;
It is infeasi=
ble
to find two inputs that produce the same output when hashed. Since a hash c=
an
take any input and produce a fixed output, it makes sense that multiple
different inputs will create the same output. A good ha=
sh
function will make it so that you have to try a large number of inputs befo=
re
finding two that produce the same output.
=
In this section, we're going to talk about cryptograph= ic hashing.
A cryptographic hash is a special kind of cryptographic function known as a one-way function,
whereas most cryptographic functions are two-way, mean= ing that data cannot only be encrypted, but can be decrypted at the other end.<= /p>
Hashes, or cryptographic hashes, are very unique in th= at once data is encoded, it can never be decoded.
Let's look at a small example of this.
If we take a simple sentence, "Let's eat, grandma!", this input sentence will generate a unique 32-character hash output.
This hash output can be thought of as an identifier fo= r this input data.
In other words, I can input this data into a hash func= tion to generate this output, and I can share this output with anybody, anywhere= ,
safe in the knowledge that it is mathematically imposs= ible for anyone to reverse-engineer the original input from this hash output.
In fact, the only possible way that anybody could ever determine what this input was,
was by randomly inputting data into a hash function un= til they were able to recreate the same output.
Another unique function of a cryptographic hash is tha= t any small change to a dataset, no matter how small,
will result in an entirely different hash.
If I remove the comma from this sentence, not only do I entirely change the meaning of the sentence,
I also generate a new 32-character hash output.
This 32 character hash outp= ut remains a fixed length no matter how big the input dataset is.
To demonstrate this, let's take the entire first book = of Tolstoy's War and Peace, and paste it into our hash function.
You'll see that the most time-consuming part of this i= s not generating the hash,
but simply moving all the data from the clipboard into= the input text box.
I've generated a unique 32-character output or identif= ier for this input text.
You'll notice that this is the same length hash that I= got when I had a short one sentence input,
and if I change anything in this extremely large datas= et, even one character, I will generate an entirely new hash output.
Let's take a look at this by removing the period at th= e end of this sentence, and replacing it with a question mark.
You'll see that by doing so, I've generated a complete= ly different and unique 32-character hash output.
Hash functions not only play a critical role in blockc= hain security by enabling blocks to be linked together in creating immutability between data on the blocks,
they can also be used as a great way to identify and v= erify large sources of data.
Let's look at some other use cases.
If I want to build a system which authenticates users,= but I don't want to store their password directly in a database where it might be stolen or corrupted,
a hash function can be a great solution.
Let's say I have a very simple password, password123, = but I don't want to store that password inside my authentication database.
I can simply ask the user to type in their password and store the hash output from that password.
Any subsequent time a user tries to log on, I don't ne= ed to know their password. I just need to verify that they're able to recreate th= is hash output.
If they can't do that, because they have the wrong pas= sword, then I can simply choose not to authenticate them into my system.
Cryptographic hashes can also be used to validate sour= ce code or real large datasets in the real world.
Let's look at self-driving cars for an example.
Let's say we've developed a self-driving car with the intelligence to hash the source code every time it starts up.
My self-driving car, every time I start the car, can t= ake its source code, run it through a hash and generate a unique identifier.
It can then share this identifier or 32-character hash output with every other self-driving car it has contact with,
or even validate this against a database or some other centralized data store, or perhaps an immutable record on the blockchain.= p>
This gives me the confidence that if the source code f= or my self-driving car ever gets hacked and makes it unsafe to drive,
I'll know it right away. I'll try to start my self-dri= ving car, which will immediately hash its source code,
share that hash output with other self-driving cars or validate it against an authoritative source,
and instantly we can see I've got an entirely differen= t hash output letting me know before I've gone anywhere
that my self-driving car is not safe, and putting that self-driving car into a limp or shutdown mode,
where it simply refuses to go anywhere until the compr= omised software has been updated and replaced with the right version.
Cryptographic hashes give us a way to link all blocks = on the blockchain together in an immutable fashion,
such that if any one particular block or the data on a= ny block is changed or altered to any degree, no matter how small,
we will know it instantly and we will break the link b= etween that block and every subsequent block.
If you haven't watched the module in this course that = covers the in-depth walkthrough of Proof of Work consensus,
you might want to check it out now.
We actually show how cryptographic hashing is used to = link together all blocks on the blockchain,
creating a data store that is immutable, secure, and extremely trustworthy.
Next, let's engage with an interactive lab. This lab is an
actual hands-on demonstration of taking data and creating a hash output. En=
joy!
A special typ=
e of
data storage structure based on hash functions is called a Merkle tree:<=
/span>
=
=
=
Merkle trees =
are
a data structu=
re
that allows authenticated storage with efficient data retrieval.
Blockchains use Merkle trees for fast and efficient validation of data.
Merkle trees summarize the entire set of data in a blo= ck by creating a root hash of that data.
A root hash is created by repeatedly hashing pairs of = child nodes until only one node is left.
Let's take a look at a diagram of a Merkle tree.
This diagram consists of four transactions represented= as transaction "A", transaction "B", "C" and "D".
The transaction data is then hashed and the resulting = hashes are stored in leaf nodes represented as H of "A", "B", "C" and "D".
Nodes are repeatedly hashed in pairs and the resulting hashes are stored in child nodes until only one node remains: the Merkle ro= ot or root hash.
The reason you wouldn't want to hash the entire set of= data as a string is because it's not efficient when validating transactions.
In this example, if Alice needed to show Bob that this transaction was valid, let's say transaction "C", Alice would nee= d to send the entire list of data to validate the block.
But when using a Merkle tree, Alice only needs to send= the nodes that contain the transaction that she is looking to validate.
Let's say Alice wants to validate transaction "F&= quot;.
Alice would only need to send the data of transaction "F" and four hash values to Bob.
Bob would then calculate the hash value based on the g= iven information.
And if the root matches the block, the transaction can= be assumed to be valid.
Merkle trees allow for validation of a specific transa= ction without requiring the entire set of data.
The use of public keys for identity management is a logical
choice since knowledge of a public key is necessary for verification of dig=
ital
signatures. Both Ethereum and Hyperledger Fabric use digital signatures on
transactions and blocks to verify the identity of the creator and that the
signed data has not been modified since signing. Public key cryptography is
used in the blockchain as a method for managing users’ identities without
revealing real world identities.
In Ethereum, users are identified by an address that is dire=
ctly
related to the user's public key. This provides identity verification while
preserving anonymity.
In Hyperledger Fabric, users are identified via =
X.509
certificates. These certificates provide several pieces of information a=
bout
the user, but one of these is also the user's public key.
Hash functions are at the core of all blockchain technology.=
One
of the primary uses for hash functions is chaini=
ng
blocks together. In both Ethereum and Hyperledger Fabric, blocks include the
hash of the previous block to tie the blockchain into a cohesive whole.
Zero-knowledge proofs are to increase the privacy of users.
Currently, Ethereum is working on a layer 2 solution, where a second layer
blockchain would store large amounts of data and only prove the batch of
information is valid to layer 1 (mainnet).
Hyperledger Fabric has a pluggable cryptographic library that supports ZKP
techniques for enhanced privacy measures.
Merkle trees are a data structure that allows authenticated
storage with efficient data retrieval. Both Ethereum and Hyperledger Fabric=
are
smart contract platforms that use a particular type of Merkle tree called
the Patricia tree=
span> to
store the current state of their virtual machine.
Now, that we have an understanding of how collaboratio= n and cryptography work together to create a layer of trust,
let's discuss how blockchain has a powerful disintermediation effect.
Nodes on the network are allowed to place data directl= y onto the database that is shared.
This eliminates the need for an intermediary to do such task.
As we discussed, developers can create a distributed l= edger on a blockchain,
and use cryptography to give people secure storage spa= ce on that ledger.
This creates a very different world than what we have = come to know today,
because for the first time in the digital world, peopl= e are allowed to own their own data.
You may be asking yourself: "How is this differen= t from the current technology?".
Today, organizations use our data, sell our data, stor= e our data, and exchange our data.
Data is an extremely powerful asset and to own your ow= n data is a vast change to the current system.
In a world powered by blockchain, having ownership of = your database is truly empowering.
You can now share the information that you choose with= any organization that you desire.
The power of blockchain and owning your own data is the ability to transact peer-to-peer.
With the current system of intermediaries, when you go= out to eat at a restaurant,
and you pay with your credit or debit card, you're not paying the restaurant directly.
Instead, a database record at your bank is being debit= ed and the database record at their bank is being credited.
In this example, the value and data in the database be= long to the intermediary, and not the individual.
You are then dependent upon them to secure and validat= e your transaction, which shifts the power to the intermediary.
But in a blockchain world, the individual has their own ledger record,
and the secure key that allows them to access it.
You no longer need an intermediary.
A transaction is simply debited from your record and credited directly to somebody else's record.
Blockchain allows you to have the power to control mor= e than financial transactions.
Later, we'll take a deeper dive into how the healthcare industry may utilize blockchain to allow people to own their own health records.
And with blockchain, you can determine who can access = those records.
We talked about how cryptography and collaboration cre= ate trust.
Now, let's examine how peer-to-peer transactions with blockchain create transparency which can lead to even another layer of trus= t.
This layer of trust can aid to curb corruption and even create cost savings.
Currently, the data and records owned at centralized organizations are stored and hidden within a database.
These databases for the most part = are inaccessible and do not communicate in an effective manner with other syste= ms.
This also makes it easier for a corrupt individual or = persons within the centralized organization to manipulate these records.
Because of the possibility for manipulation and foul p= lay, there are many flawed and expensive safeguards put into place.
These safeguards are done through regulations and legal requirements creating expensive overhead and delays.
Besides the mounting cost to safeguard these internall= y, there are also many necessary safeguards from external forces,
because they are individual points of critical data st= orage, bad actors have to identify only one point of failure to access.
The combination of one central point of storage and the storage of valuable data make these centralized databases a very enticing target for malicious persons.
With blockchain, these malicious actors would have to = identify and target numerous points of failure until they control more than 51% or what's known as consensus.
In most blockchains, it could be up to hundreds of tho= usands of points of weakness that would have to be exposed to be corrupted.
It's nearly an insurmountable task.
Not only must a centralized organization worry about b= ad actors, but they must do so, while still allowing access and synchronizing = with other centralized organizations.
Having to constantly update and synchronize data acros= s many centralized databases is not efficient.
The cost is high and the vulnerability to bad actors is amplified.
All the more reason blockchain solutions are so exciti= ng.
Blockchain offers efficiency. It also creates trust and financial benefit through transparency, security, immutability, and accessibility through ownership.
A database is a colle= ction of interrelated data organized so that individual records or groups of records= can be retrieved to satisfy various criteria.
Traditional
databases use the CRUD method which has four main operations:=
·&nb=
sp;
Create - add a
new value to the database.
·&nb=
sp;
Read - read a
value from the database.=
·&nb=
sp;
Update - chan=
ge
an existing value in the database.
·&nb=
sp;
Delete - remo=
ve
the value from the database.
Traditional
databases do not retain historical information:
·&nb=
sp;
Only the most
recent versions of each value are visible.
·&nb=
sp;
Deleted values
are not visible in the database.=
span>
·&nb=
sp;
This limits t=
he
transparency of data contained in the database.
·&nb=
sp;
Values can be
modified or deleted after creation.
The CRUD upda=
te
model of databases allows data to be changed or removed from the database. =
This
means that the visible data in a database is not an
accurate historical record of the database. The existence of an update
operation means that each value in the database is only the most recent ver=
sion
of that value and could have had different values in the past. The delete
operation means that values can be
removed from the database.
This limits t=
he
transparency of data in the database since values can be modified or deleted
after creation.
The blockchai=
n is
designed to be a data structure that only allows appending:
·&nb=
sp;
The past hist=
ory
of the blockchain is visible and immutable.
·&nb=
sp;
Updates to the
blockchain can be performed by including them in new blocks added to the
blockchain.
The blockchai=
n is
designed as a data structure where each block in the chain locks in the val=
ue
of the previous block and so on, back to the first or genesis block. =
This
means that the blockchain is an append-only data structure without support =
for
modification or deletion.
The entire
history of the blockchain is
publicly visible and stored in a distributed and decentralized fashion. Val=
ues
in the blockchain can be “updated” by appending a new version of that value=
in
a later block, but the complete history of the value is preserved.=
span>
The blockchain is des= igned so that its entire history is visible and unchangeable. Transactions in the blockchain cannot be modified after creation, and their complete history is publicly visible. This means that the blockchain is a completely transparent data structure with the useful property that the integrity of the blockchai= n is easily verifiable by any user.
Traditional
databases and the blockchain were created for different purposes and have
different levels of transparency. Traditional
databases have low transparency since values can be modified or deleted;
however, this changeability allows them to store data in an efficient manne=
r,
with only the most relevant versions of each value retained in storage.
The blockchai=
n is
publicly visible
and immutable, meaning that it has very high transparency. Its append-only
structure and decentralized storage sacrifice storage efficiency for
trustworthiness of the stored data.
One of the big benefits we get in any blockchain solut= ion, public or private, is the idea of transparency.
In a public blockchain solution like Bitcoin or Ethere= um, because they're anonymous and we have no concept of identity, we have no wa= y of treating users differently.
And so all data on a public blockchain is transparent and visible to all other participants.
And this is really important. It adds a lot of value, = when we're talking about exchanging currency or tokens of monetary value,
because as long as we can protect the anonymity of the participants, it gives us a great way for anybody to validate the details of any transaction on a ledger
that is immutable, permanent, can't be changed and off= ers a high degree of trust.
This also has a lot of other really interesting potent= ial use cases that we're starting to explore with public blockchain technology,=
voting and voter registration, tracking election resul= ts.
These kind of things are re= ally, really great use cases for having that level of public transparency.
On public blockchains, there's another kind of transpa= rency, which adds a lot of value as well, and that is full transparency into the s= mart contracts that execute on that blockchain.
These, oftentimes, are smart contracts which have the potential of working with other people's money,
sometimes large amounts of other people's money, and if you're going to entrust your hard-earned money into someone else's smart contract,
it's really nice to have the ability to be able to go = and review the source code of that smart contract,
either yourself or by hiring a developer to audit that= smart contract, to make sure it's written fair,
that there are no security vulnerabilities, and that i= t does what it claims to do.
On the private blockchain side, what we have [is] permissioning.
And we can control how open or closed our data is.
We still have a lot of benefits of being able to share= data in shared infrastructure that private blockchain creates.
There are a lot of business networks and value chain relationships where the participants would love to be able to share more da= ta
and more information with consumers about the business processes and the steps that go into delivering the goods and services we consume.
What has traditionally prevented solutions like this i= s the lack of any kind of shared infrastructure.
While technically conventional technology may be able = to address these concerns,
it is oftentimes human beings not being able to come to consensus on questions of who owns the platform, who builds the platform, w= ho maintains the platform.
And, if a participant leaves the ecosystem, do they ta= ke all or part of the platform with them.
That have prevented us from using conventional technol= ogy in these respects.
Using private blockchain solutions like Hyperledger, c= an help alleviate many of these concerns and create a truly shared technical i= nfrastructure between organizations.
This allows participants in a supply chain or value ch= ain to track data and to share that data about how goods and services are produced= ,
created, consumed, and distributed into the open marke= t, that we haven't really been able to do practically before.
It's estimated that over 1/3 of the food we produce go= es to waste, because we don't have this kind of clarity into our supply chain with food or into the supply chain with other types of products.
Think about if a meat gets recalled because it might be contaminated, how much perfectly good meat gets thrown away just to err on = the side of caution.
Where if we just had greater resolution and visibility= into where that product originated from and how it went all the way from product= ion to our plate.
Then, we could issue more accurate recalls and reduce = the amount of food waste.
Consumers might value your product more, your offering more, if they're able to see where it comes from.
If you're manufacturing and distributing clothing, and= you can demonstrate to consumers that all of that clothing was
sourced from parts of the world with fair labor practi= ces consumers are going to
have more trust and faith in the brand and ultimately willing to pay a higher price for it.
So, these kind of transparency solutions are one of the biggest benefits of blockchain and one of the areas being most explored,
because right now there are a lot of consumers who wou= ld simply like more visibility into the products and services they purchase.= p>
And blockchain, both public and private, can be a great solution for doing that.
Blockchain is
designed to be an authoritative ledger of t=
he
history of the network.
=
This history =
may
include financial transactions=
and
business agreements where modifications to the ledger may have wide-reaching
business impacts. Blockchain is based on an untrusted network, so trust that
the blockchain has not been modified needs to arise from the structure of t=
he
blockchain itself,
rather than from trust in the organization storing a certain copy.=
span>
So, one of the big benefits of blockchain is what's kn= own as immutability.
The idea that once a record gets committed to the bloc= kchain or to the ledger, it's there permanently.
In blockchain, it's a little bit different than a data= base, and we'll talk about this in another module, in a lot more depth,
but in a traditional database we're used to being able= to edit records and delete records, and that's not the case in a blockchain.= p>
In a blockchain, there are only two possible operation= s: we can create a new record, and we can go back and we can read existing record= s.
And this contributes to this idea of immutability - on= ce data is written to the blockchain it can't be edited, it can't be deleted.<= /p>
All you can do is add another record to the blockchain indicating that something about that data has changed.
This immutability is what makes blockchain such a secu= re solution, and it's what makes it a trustless solution.
Meaning, I don't have to trust anybody that I'm intera= cting with and trading with, as long as we both trust in the blockchain and the d= ata on the blockchain.
Then, we can transact back and forth seamlessly.
The way immutability works is blockchain is, by design= , a very, very inefficient solution.
We are asking a large number of nodes, all the nodes o= n a network, to perform exactly the same work as every other node.
So, essentially, we are duplicating work over and over= and over again.
The reason we do this, is because the only way to potentially change data on a blockchain,
is by changing the record on that blockchain for 51% o= r more of the nodes, or the miners, or the participants trying to come to consensu= s on the blockchain.
And when you get to very, very large-scale networks, Ethereum with its 16,000 plus nodes, Bitcoin with over 30,000 nodes, this becomes a very, very, very tall order.
Trying to hack or change a record on over 15,000 of th= ose Bitcoin nodes would be quite a bit of work.
So, it's not impossible to change the record on a bloc= kchain, but it is impossible from a practical standpoint.
Now, one thing that should be noted when we talk about immutability is: all that blockchain gives us is an accurate recording of w= hat was posted.
It is still up to whoever is posting that information = on the blockchain to make sure it's accurate and true.
In other words, blockchain doesn't do anything to vali= date that the information on it is correct.
All it validates is that that information hasn't been changed since it was originally written.
Another way to think about that is, I could post a rec= ord on blockchain that says: "The sky is orange".
That doesn't make the sky orange.
We all know the sky is blue. All that does is that mea= ns I can't ever come back later and claim I didn't say that or I said it was blu= e, and someone changed the record.
That immutability that blockchain gives us is that tha= t data was captured as it was originally written and hasn't been changed.
Another part of this immutability is cryptographic has= hing, and the way that we chain all these blocks together.
If you haven't watched the module on Proof of Work, I = would suggest you go watch that now, to see a really in-depth overview, a hands-on demo of how blocks are actually linked together in such a way.
And, if I ever went back and tried to change any infor= mation or prior transaction on the blockchain, I would break that chaining in a ve= ry
obvious way that anyone would immediately spot if they= came and querried that data off the blockchain.
So, when you hear about immutability, just understand = that all we're talking about is the virtual impossibility of anyone ever being a= ble to come along and change any data on the blockchain.
And also, along with that, understand that we only hav= e two possible operations on blockchain: we can only read data and we can only add new data.
There's no concept of an edit or delete, and this is w= hat we talk about when we talk about immutability on the blockchain.
The blockchain
needs to be immutable. If someone can change the blockchain after the fact,
then it is no longer a trusted historical ledger. The blockchain is designe=
d so
that immutability is cumulative; each
piece is linked to every other piece, creating a cohesive whole that is more
difficult for an attacker to modify.
·&nb=
sp;
At the bottom
level, transactions are digitally signed by their creators. An attacker can=
’t
forge a transaction unless they steal a private =
key.
·&nb=
sp;
A block struc=
ture
is predefined. Attackers can’t modify it to suit their purposes.
·&nb=
sp;
The chain par=
t of
the blockchain is achieved using hash functions. Each block includes the ha=
sh
of the previous block, creating a clear link between each block in the
blockchain.
·&nb=
sp;
Each block is
digitally signed by its creator. The creator is selected through the
blockchain’s consensus protocol, making it difficult for an attacker to be a
legitimate creator.
All four of t=
hese
features help to make the blockchain resistant
against changes occurring after the fact.
Each transact=
ion
cannot be forged or modified because it is mathematically infeasible to for=
ge a
digital signature. The structure of blocks is publicly defined, and invalid
blocks will be publicly rejected.
Each block “locks=
in”
the value of previous blocks by including their hash. Attackers cannot find
another block that will produce the same hash.
A block canno=
t be
forged or modified, because it is digitally signed by the creator. The crea=
tor
of a block is either publicly k=
nown
(Proof of Stake) or difficult to become (Proof of Work), making masqueradin=
g as
the real creator difficult or impossible.
Now, let’s ta=
ke a
moment to discuss how each of the features mentioned contribute to the
immutability of the blockchain.=
span>
At the bottom
level, each transaction is digitally signed. This means two things about
transactions:
·&nb=
sp;
Existing
transactions can’t be changed after the fact, because the signature will no
longer match.
·&nb=
sp;
Fake transact=
ions
can’t be created since an attacker can’t creat=
e a
valid digital signature for a transaction between other parties.
Both of these
contribute to the immutability of the blockchain since they limit the range=
of
transactions that an attacker has to work with if he wants to create a fake=
but
valid blockcha=
in.
Next, the blo=
ck
structure is publicly defined in the protocol. This limits the types of
modifications that an attacker can make to a block when trying to modify the
blockchain.
Third, each b=
lock
contains the hash of the previous block. This is what ties
the blocks of the chain together. Remember from earlier that one of the
properties of a hash function is that it is extremely difficult to find two
inputs to a hash function that create the same output. Since a block contai=
ns
the hash of the previous blo=
ck,
it’s difficult to find a different version of the ledger’s history that mat=
ches
the most recent block, as that would require finding two different versions=
of
the previous block that have the same hash.
Finally, each
block is digitally signed by its
creator. Since the creator of a block is selected via a consensus algorithm,
it’s difficult for an attacker to become the legitimate creator of a given
block. If an attacker is not the legitimate creator of a block, it’s imposs=
ible
for them to create a digit=
al
signature that others would accept.
Now, let’s look at how different blockchains implement
immutability.
In Ethereum and Hyperledger, the immutability mechanis= m is the one that we’ve described previously. Each transaction and block is digitally signed and are linked using cryptographic hashes.
<= span style=3D'font-size:13.5pt;font-family:"inherit",serif;color:#00688D'>Corda<= /span>, a multi-party application development platform, relies on its notary service for immutability. Each Corda network has one or more notary services that verify transactions. Each transaction is considered separately and, if approved, is signed by the notary service. Transactions signed by a notary = are finalized and cannot be modified after the fact.
It is important to understand the value of locking in =
the
previous block by including its hash in the next block. As explained in the
article “A Gentle Introduction to Immutability of Blockchains” by
Antony Lewis,
· Creating a ledger of transactions with blocks that refer to previous blocks is a much better idea than numbering the bloc= ks sequentially.
· In a book with pages, 1, 2, 3, etc., it woul= d be easy to tear out page 25 and replace it with another page.
· The integrity of the book has been manipulat= ed and altered. However, there is nothing about the new page number that ties = it (chains it) to the content of the previous page.
· Instead, in a blockchain, blocks are referen= ced by their hash and each block explicitly specifies which block (hash) it is building on.
We will cover the Pro= of of Work in a later module. However, this demo uses the Proof of Work to show h= ow blocks are chained together and how tampering with information in a past bl= ock destroys the integrity of the proceeding blocks.
In this video, we're going to talk about Proof of Work consensus, and how Proof of Work consensus is used to create an immutable c= hain of block data on the blockchain.
Let's take a small example. Let's say we have some blo= ck data and, in the interest of simplicity, we will keep this very, very short= .
But understand that in real life a block will most lik= ely contain many more than just three transactions.
But on this block, we have a full block consisting of = three transactions.
When it's time to validate a full block, all nodes on = the network will start to guess a nonce value.
What we're looking for is a nonce value such that when= we take our input transaction data and we combine it with a nonce value, we ge= t a hash output that matches the difficulty.
In this case, the difficulty is a hash output that beg= ins with four leading zeros.
Every node on the network will guess a different nonce randomly until they happen to find one that matches the difficulty.
So, our node may start off by guessing "123"= , and we see that that does not produce a hash output that matches the difficulty= of four leading zeros.
Let's try again. Let's try "973321". Once ag= ain, that does not give us a hash output that matches the desired difficulty.
[So], rather than guess over and over and over, let's = go ahead and ask a computer to do our work for us.
The computer is now guessing different nonce values ra= ndomly until it happens to guess "22294", which you see produces a hash = that begins with four leading zeros.
Because this hash is the output of input to a hash fun= ction consisting not only of the transaction data, but also of the nonce, changing either one will result in a new hash output which does not match the difficulty.
If I change "22294" to "22295", yo= u'll see I get a hash output which no longer meets the difficulty criteria.
However, if I change any of my transaction data, I'm a= lso altering the input to the hash function, and thus generating an output whic= h is completely different from the desired outcome.
In this way, nodes or miners on a network can validate= they have the same transaction data.
If we all start randomly guessing nonce values for thi= s set of data and my node guesses "22294" first,
all it has to do is simply share this nonce value with= every other node on the network.
Each node can then try this value "22294" on= their copy of the transaction data.
If any of the data has been altered or changed in any = way, no matter how insignificant, or the node in question simply did not record = the data correctly, this nonce value will not work for them.
For example, if we change "4.2 bitcoin" to "4.9 bitcoin", you'll see that the proposed nonce does not work.<= /p>
In this way, all nodes can come to consensus or agreem= ent on what the right set of transaction data should be.
When a node thinks it's guessed the right nonce, it si= mply shares that value with the rest of the network.
If the majority of the network, 51% or more, agree wit= h this nonce, because they have the same transaction data on their copy of the blo= ck,
then the miner who guessed this number first, will be = rewarded and the network will come to consensus or agree that this is the correct version of the block data.
Any nodes which have different data for the current bl= ock will then discard the copy of the current block they have and replace it wi= th a copy that the rest of the network has agreed upon.
This method is used to create blocks of data chained together.
So let's say, that we have = some transaction data here on the blockchain.
We're gonna go ahead and m= ine our first block.
Now, you'll notice what we've added in this demo is th= e hash of the previous block, which is something we store in the header of every b= lock on the blockchain.
Because this is the first block, I simply get a previo= us hash value of zero.
Combining zero with the current transaction data on th= e block and the proposed nonce gives me a hash that meets the output difficulty.
When it's time to validate the second block, the proce= ss repeats itself.
I simply take the hash of the previous block stored in= the header of the current block, combine it with the transaction data in the current block, and try to guess the correct nonce.
In this case, it's "12314"
As discussed in our video on cryptographic hashing, ch= anging any of the input data, no matter how slight, will result in an entirely different hash.
So, if I try and change "2.3" to "2.9&q= uot;, I no longer get an output which matches the current difficulty.
This new output is also reflected in the header of the= next subsequent block.
If I have a series of blocks that have all been mined = and linked together, then you can see that going and changing data on any block will break every subsequent block after it.
So, if I try to alter this record "David pays Cha= rlie 2.3 bitcoin" and I want to change it to "5.3 bitcoin", I cha= nge the hash output of the current block.
This is reflected in the current block and also in the= next block.
Now, the nonce proposed for the next block does not wo= rk when combined with that block's transaction data and with the hash of the previous block.
This means that if I want to alter data on the blockch= ain, not only do I need to remind the block that I changed the data on, I also n= eed to remind every subsequent block in the blockchain.
This is no trivial task when you consider that major blockchain such as Bitcoin and Ethereum contain millions of blocks.
And this process must be repeated on tens of thousands= of nodes worldwide in a very short amount of time.
This ability to link together blocks in an immutable f= ashion and to cause attackers to have to undertake so much work, repeated so many times is what gives blockchain its security and immutability.
I hope you've learned a little bit more about Proof of= Work consensus and how blocks on the blockchain are linked together through watc= hing this video.
Next, let's engage with an interactive lab. This lab w=
ill
give you the chance to examine blocks on the blockchain. Enjoy!
In this chapt=
er,
we discussed:
·&nb=
sp;
Distributed
ledger technology (DLT) and how it differs from previous ledger storage
techniques.
·&nb=
sp;
Cryptography =
and
how it is used in several different ways in blockchain.
·&nb=
sp;
Hashing functions,
zero-knowledge proofs (ZKPs) and Merkle tree data structures and how they a=
re
used to secure the blockchain.
·&nb=
sp;
Public-key
cryptography and public/private key pairs to support privacy, authenticity =
and
security.
·&nb=
sp;
Ledger
immutability and transparency result from
combining these technologies for an agreed-upon, append-only distributed le=
dger
system chained together by blocks.
In this chapt=
er,
we will examine some blockchain functions. First, we will discuss smart
contracts, how blockchains have the ability to s=
tore
and run computer code (applications) that can execute the terms of an
agreement. These digital promises stored and executed on the blockchains re=
move
intermediaries and ambiguity thereby reducing conflict.
We will discu=
ss
how blockchains secure their
information and how these techniques differ from traditional database secur=
ity.
Next, we will discuss different types of blockchains (public, private and
hybrid models) and design considerations that need to be made before
blockchains can be developed. We =
will
examine the steps in a basic blockchain transaction from start to finish.=
span>
Finally, we w=
ill
discuss blockchain consensus models and why they are the backbone to the
blockchain operations. We will compare Proof of Stake and Proof of Work mo<=
span
style=3D'mso-style-textoutline-type:none;mso-style-textoutline-outlinestyle=
-dpiwidth:
0pt;mso-style-textoutline-outlinestyle-linecap:round;mso-style-textoutline-=
outlinestyle-join:
bevel;mso-style-textoutline-outlinestyle-pctmiterlimit:0%;mso-style-textout=
line-outlinestyle-dash:
solid;mso-style-textoutline-outlinestyle-align:center;mso-style-textoutline=
-outlinestyle-compound:
simple;mso-effects-shadow-color:black;mso-effects-shadow-alpha:100.0%;
mso-effects-shadow-dpiradius:0pt;mso-effects-shadow-dpidistance:0pt;mso-eff=
ects-shadow-angledirection:
0;mso-effects-shadow-align:none;mso-effects-shadow-pctsx:0%;mso-effects-sha=
dow-pctsy:
0%;mso-effects-shadow-anglekx:0;mso-effects-shadow-angleky:0'>dels and be a=
ble
to discuss the differences and environmental considerations. Also, we will
discuss private blockchain structures and how permissioning=
mechanisms a=
re
the basis for their ConsenSys models.
By the end of
this chapter, you should be able to:
·&nb=
sp;
Explain what
smart contracts are and h=
ow
they work.
·&nb=
sp;
Discuss the
benefits of using smart contracts.
·&nb=
sp;
Compare
blockchain security vs. standard security.
·&nb=
sp;
Indicate the
differences between private and public blockchains.
·&nb=
sp;
Understand wh=
en
to use a public vs. a private blockchain.
·&nb=
sp;
Analyze the flow of a
transaction in blockchain.
·&nb=
sp;
Discuss conse=
nsus
mechanism used in blockchain.
·&nb=
sp;
Explore diffe=
rent
methods of achieving consensus (Proof of Work, Proof of Stake, etc.).
When we make a transaction on the blockchain, understa= nd that there are only three types of transactions we can make.
It's what I refer to as the onion model of blockchain.=
And we're gonna start off = with a very outer layer of that onion.
The thing that most people are familiar with when they= get into blockchain.
The thing we do all the time when we trade cryptocurre= ncy back and forth.
That is two or more parties coming together and using = the blockchain to record an announcement of the exchange of monetary value.
So, we might use blockchain to record the fact that I = paid you three Bitcoin for your used car or I paid you twelve blockchain for your vacation home.
This is the model that many of us start off with in blockchain and again, it's the one that's most familiar and gets talked abo= ut the most right now.
But if we peel away that outer layer, and we take away= the idea of a monetary transaction or exchange,
well, then we're left with two or more parties using blockchain to record an important announcement.
And we see many valid use cases around this. Let's say= , that I go to the doctor for my annual physical.
My doctor checks me out and he says: "Hey Kris, I= want to put you on a new prescription for XYZ".
Well, maybe we're keeping our medical information on t= he blockchain, and so my doctor and I both agree that's a pretty good thing to= add to my medical record.
In this case, we still need two or more parties, becau= se it's very important that I, as a patient, don't have the ability to go and update my own medical record without a licensed medical professional involv= ed.
And it's also equally important that my doctor is not = able to update my medical record without my consent or permission.
And so, that's two or more parties coming together, recording an important announcement or important data point,
but nowhere in that example has money or anything of m= onetary value exchanged hands.
Now, if we peel away the very last layer, you can take= away this idea of having to have two or more parties.
And what we're left with is just a single party announ= cing an important or significant event.
And this is the simplest type of blockchain transactio= n, and also the most powerful.
So, if we think about blockchain, perhaps for managing= a supply chain scenario,
we might have a grower of organic produce announce or = commit a record to the blockchain that says they've planted a crop.
And we might have an organic pesticide company come and treat that organic produce.
We still have a single organization or single entity m= aking the announcement of something they did, and this is really the heart of blockchain.
When you understand that it becomes really easy to understand where smart contracts fit in.
And smart contracts are just computer code. They're co= dified logic that we can use to respond to any kind of event that gets captured on= the blockchain.
So, in that organic produce example, if I want to noti= fy someone when that fresh produce has been treated with organic pesticide, so= I can create traceability for the end consumer,
well, I might have a smart contract that manages that = that defines the rules and the steps that get taken when that particular type of event occurs.
And so this is all smart co= ntracts are.
There's oftentimes a misconception when people hear th= e word contract that they think of a legally binding agreement between two or more parties.
It's not necessarily the case. Smart contracts don't h= ave to be legally binding and they don't have to involve multiple parties.
In fact, if you come from a programming or development background you can think of a smart contract easily enough as a "class".
If you're not a programmer or don't come from a develo= ping background, you can just think of a smart contract as a set of rules that g= et executed every time a certain type of event happens.
And this is where the real power of blockchain comes i= n that not only do we have a permanent, unchangeable record of all the different events that have occurred,
we can also write computer code, very, very non-subjec= tive computer code, that defines exactly how that process is going to be managed= and what steps are going to be taken when that event occurs.
This allows us to ensure process consistency.
It allows us to ensure that processes that are normally fulfilled by intermediaries or middlemen can now be satisfied on their own without the need for human intervention.
And this leads to much more lean and efficient organiz= ations in way of organizing human effort.
So, when you hear smart contract just think about comp= uter code that you write to respond to certain types of significant events.
If you've ever worked with workflow or business process automation or management tools, you can think of smart contract is just bei= ng another workflow tool, albeit one that has the power to work with money.
So, don't get too intimidated when you hear smart cont= racts, and don't get too caught up in the language.
While they sometimes may be legally binding, they're n= ot necessarily legally binding in the same way a true contract is.
They're just a way for us to bake our own logic into b= lock chain solutions to ensure that consistency of execution.
Let’s review =
some
basic information about smart contracts:
·&nb=
sp;
They are comp=
uter
programs that execute an action based on terms and conditions.=
span>
·&nb=
sp;
Can also be k=
nown
as chain code.
·&nb=
sp;
Smart contrac=
ts
have terms recorded in a computer language instead of legal language. Smart
contracts are not necessarily legally binding and do not need multiple
participants.
·&nb=
sp;
Each step of a
smart contract can only be
implemented after the execution of the immediate former step.=
·&nb=
sp;
Smart contrac=
ts
are written in Solidity, a programming language designed for developing sma=
rt
contracts that run on the Ethereum Virtual Machine.
·&nb=
sp;
The smart
contracts act as a foundation to build
decentralized applications (DApps<=
/span>).
·&nb=
sp;
Once executed,
the information in the smart contract is stored on a blockchain which canno=
t be
altered.
These are som=
e of
the features that smart contracts provide:
·&nb=
sp;
Accuracy
Replacing hum=
an
intermediaries with executable co=
de
ensures the process will always be performed the same.=
·&nb=
sp;
Cost savings<=
br>
Replacing
intermediaries often provides significant cost reduction.
·&nb=
sp;
Efficiency
Removing proc=
ess
intermediaries often results in significant process efficiency gains.
·&nb=
sp;
Backup
A blockchain =
and
smart contract deployed to it can provide a permanent record, allowing for
auditing, insight, and traceability, even if the creator is no longer in
business.
·&nb=
sp;
Autonomy
Smart contrac=
ts
can be developed by anyone, no need for intermediaries such as lawye=
rs,
brokers, or auditors.
One area getting a lot of attention in blockchain righ= t now, is campaign finance and campaign donations.
There are some really interesting and compelling use c= ases, ways that we might be able to use blockchain to do new and innovative things around campaign finance that just aren't practical or feasible today.
Let's say that I'm running for office and you want to support my campaign.
Well, today, you might write me a thousand dollar chec= k and I get all 1,000 of those dollars right away to use for my campaign.
Maybe, we want to use blockchain to empower voters to = keep their politicians more accountable to the promises they make on the campaign trail.
Consider the following scenario.
Let's say, that instead of donating a thousand dollars= to my campaign, you write a smart contract on the blockchain to manage campaign donations.
You give that smart contract a thousand dollars instea= d.
That smart contract has been programmed with the terms= and conditions under which it is able to release those funds to my campaign.
I might get two hundred and fifty dollars of that thou= sand initially to use for my election.
If I get elected, the remaining $750 can stay in the s= mart contract.
Otherwise it gets refunded = to you.
Let's say, I do get elected. Perhaps, I don't get the = second 250 of that thousand dollars until a year in off= ice, if I fulfilled three or more of my campaign trail promises.
And then, we might say as a final step, I get the rema= ining five hundred dollars to use for my reelection, only if I fulfilled 80% or m= ore of my campaign promises during my first four-year term in office.
This would put a lot of power back in the hands of vot= ers and would keep politicians accountable for the promises they make, long aft= er election day.
While things like this certainly are possible with conventional technology, they're not very practical or feasible.
Blockchain and smart contracts puts this power back in= the hand of voters and has the potential to radically reform campaign finance a= nd campaign donations.
© 2021 edX Inc. All rights reserved.
深圳市恒宇博科技੍=
7;限公司 粤ICP=
备17044299号-2<=
/span>